[commited] stat.h: Fix missing declaration of struct timespec

Samuel Thibault samuel.thibault@ens-lyon.org
Sat Nov 9 23:47:05 GMT 2024


When building with e.g. -std=c99 and _ATFILE_SOURCE, stat.h was missing
including bits/types/struct_timespec.h to get the struct timespec
declaration for utimensat.
---
 io/sys/stat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io/sys/stat.h b/io/sys/stat.h
index 3b4ba80132..0e4edb483d 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -26,7 +26,7 @@
 
 #include <bits/types.h>		/* For __mode_t and __dev_t.  */
 
-#ifdef __USE_XOPEN2K8
+#if defined(__USE_ATFILE) || defined(__USE_XOPEN2K8)
 # include <bits/types/struct_timespec.h>
 #endif
 
-- 
2.45.2



More information about the Libc-alpha mailing list