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
_POSIX_TIMERS vs _XOPEN_REALTIME #295
Comments
karlp
added a commit
to etactica/packages
that referenced
this issue
Jan 25, 2018
musl-libc doesn't define _XOPEN_REALTIME as it doesn't implement the full set of the realtime operations. However, it _does_ implement POSIX_TIMERS, which is what luaposix _should_ be checking for in the posix.time module. I've filed luaposix/luaposix#295 to track this upstream, but this is a simpler, verified fix for our older version of luaposix. This restores functions like posix.time.clock_gettime(CLOCK_MONOTONIC) for instance, which was available with pre-musl builds of luaposix. Signed-off-by: Karl Palsson <karlp@etactica.com>
val-kulkov
pushed a commit
to val-kulkov/openwrt-packages
that referenced
this issue
Jan 26, 2018
musl-libc doesn't define _XOPEN_REALTIME as it doesn't implement the full set of the realtime operations. However, it _does_ implement POSIX_TIMERS, which is what luaposix _should_ be checking for in the posix.time module. I've filed luaposix/luaposix#295 to track this upstream, but this is a simpler, verified fix for our older version of luaposix. This restores functions like posix.time.clock_gettime(CLOCK_MONOTONIC) for instance, which was available with pre-musl builds of luaposix. Signed-off-by: Karl Palsson <karlp@etactica.com>
Thanks for all the links. Having read these, I agree with you, and will update luaposix accordingly. |
lynxis
pushed a commit
to lynxis/packages
that referenced
this issue
Jan 3, 2019
musl-libc doesn't define _XOPEN_REALTIME as it doesn't implement the full set of the realtime operations. However, it _does_ implement POSIX_TIMERS, which is what luaposix _should_ be checking for in the posix.time module. I've filed luaposix/luaposix#295 to track this upstream, but this is a simpler, verified fix for our older version of luaposix. This restores functions like posix.time.clock_gettime(CLOCK_MONOTONIC) for instance, which was available with pre-musl builds of luaposix. Signed-off-by: Karl Palsson <karlp@etactica.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think your use of XOPEN_REALTIME to define the availability of clock_gettime() and friends is correct. (ext/posix/time.c)
I can't find it anywhere in http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html nor does http://pubs.opengroup.org/onlinepubs/7908799/xsh/feature.html imply that this is what XOPEN_REALTIME is for at all.
I believe these should be included if POSIX_TIMERS is defined instead. XOPEN_REALTIME includes POSIX_TIMERS, but you can have POSIX_TIMERS without all of XOPEN_REALTIME.
This is causing the clock_* functions to be missing on musl-libc builds
Potentially they could be XOPEN_REALTIME or POSIX_TIMERS > 200809 or something?
https://linux.die.net/man/7/posixoptions implies that POSIX_TIMERS has covered this from 2001 as well.
The text was updated successfully, but these errors were encountered: