Bug 5468

Summary: The _POSIX_MONOTONIC_CLOCK define should not be 0
Product: uClibc Reporter: Erwan MATHIEU <cyberwan>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: uclibc-cvs
Priority: P5    
Version: <= 0.9.29.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Erwan MATHIEU 2012-08-23 06:59:01 UTC
The POSIX monotonic clock is implemented in uClibc and actually works. However, the _POSIX_MONOTONIC_CLOCK define reads 0, so some libraries which rely on it (e.g. Qt) don't use this feature, which can cause some problems. Setting the define to a value makes Qt use the monotonic clock, which does work, so I really think it should be that way...
The define is located in "libc/sysdeps/linux/common/bits/posix_opt.h".
I caught this on uClibc 0.9.29, but it seems to be identical in the actual version.
Comment 1 Mike Frysinger 2012-11-18 10:28:56 UTC
glibc defines _POSIX_MONOTONIC_CLOCK to 0 too:
$ echo '#include <unistd.h>' | gcc -E -dD - |& grep _POSIX_MONOTONIC_CLOCK

any source tree that treats that as 0 == unimplemented is broken, not the C library.  please report this to the QT project.