]> Git Repo - uclibc-ng.git/commitdiff
sys/stat.h: fix missing struct timespec definition
authorDamien Riegel <[email protected]>
Sat, 22 Apr 2017 17:30:46 +0000 (13:30 -0400)
committerWaldemar Brodkorb <[email protected]>
Sat, 22 Apr 2017 20:46:08 +0000 (22:46 +0200)
This is a second attempt to fix a compilation failure involving a
missing struct timespec definition in some situation. Previous attempt
was following commit but it had undesirable side effects and was
reverted:

  657c4a9d6c fcntl.h: fix a missing `struct timespec` definition

A similar issue was identified and reported in glibc [1], and the fix
was to include the timespec definition if __USE_XOPEN2K8 was defined. To
minimize the possible impact of this new fix, it was decided to not
replace __USE_ATFILE by __USE_XOPEN2K8 as glibc did, but to add an
additional OR condition on __USE_XOPEN2K8.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=21371

Signed-off-by: Damien Riegel <[email protected]>
include/sys/stat.h

index 495a68cb1098983feb654191b84fdf659738214f..079e779030daef2688ef07ad3b16b71bf66a0819 100644 (file)
@@ -32,7 +32,7 @@
 # if defined __USE_XOPEN || defined __USE_XOPEN2K
 #  define __need_time_t
 # endif
-# if defined __USE_MISC || defined __USE_ATFILE
+# if defined __USE_MISC || defined __USE_ATFILE || defined __USE_XOPEN2K8
 #  define __need_timespec
 # endif
 # include <time.h>             /* For time_t resp. timespec.  */
This page took 0.024162 seconds and 4 git commands to generate.