Skip to content

Fix musl 64bit time_t on 32bit arm #1026

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dougnazar
Copy link
Contributor

  • Prefer <poll.h> over <sys/poll.h>
    Musl warns if you include <sys/poll.h> rather than <poll.h>. Man page says <poll.h> so prefer that. I don't know if any systems only have <sys/poll.h> so I left that there as a fallback.
  • Always use %llu & (unsigned long long) to format time_t variables.
    On some architectures (like armv7) it will output invalid data if
    the size of the format and size of variable are different (after normal
    integer promotion). The calling convention on x86 doesn't have this issue.

Fixes: #1025

On some architectures (like armv7) it will output invalid data if
the size of the format and size of variable are different (after normal
integer promotion). The calling convention on x86 doesn't have this issue.
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.

Nagios core datetime issues with musl libc 1.2 time64 in linux/arm/v6 and linux/arm/v7
1 participant