Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple compilation fixes and one bugfix #11

Merged
merged 4 commits into from
Dec 9, 2022

Conversation

Ansuel
Copy link
Contributor

@Ansuel Ansuel commented Oct 17, 2022

Hi, by compiling this special busybox version on an openwrt buildroot I notice many compilation warning.

The idea is to fix some of them.
This also have a crucial commit that fix a segmentation fault on 32bit systems.

The related issue is here RIPE-NCC/ripe-atlas-software-probe#74

@Ansuel Ansuel force-pushed the compilation-fixes branch from b0eab10 to 3c6f8df Compare October 19, 2022 14:33
32bit systems have time_t set to long long int while 64bit system have
time_t set to long int. This is problematic as in the busybox code this
is not handled correctly and we have some casted to long and some not
casted at all.

Some arch (found this problem on a mt7621) may be restrictive about casting
and crash with segmentation fault if time_t is cast to %ld instead of the
correct %lld.

This is the cause of RIPE-NCC/ripe-atlas-software-probe#74

Use the correct type and cast every time_t to (unsigned long long) so that
eperd and condmv doesn't crash anymore and the measurement works correctly.

Signed-off-by: Christian Marangi <[email protected]>
Cast size_t to long to mute warning on 32bit systems.

Signed-off-by: Christian Marangi <[email protected]>
Cast sockaddr_in6 to sockaddr to mute compilation warning as
documentation say for getsockname.

Signed-off-by: Christian Marangi <[email protected]>
Mute some no previous prototype compilation warning found in
atlas_unsafe, rxtxrpt_main and route_set_flags.

Signed-off-by: Christian Marangi <[email protected]>
@Ansuel Ansuel force-pushed the compilation-fixes branch from 3c6f8df to be2a84c Compare October 19, 2022 14:37
@michel-stam
Copy link
Contributor

Nice work @Ansuel,

I'll pull these changes into our git repo and start testing on our platforms.

Thanks!

Regards,

Michel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants