diff mbox series

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

Message ID 20241109234705.526889-1-samuel.thibault@ens-lyon.org
State New
Headers show
Series [commited] stat.h: Fix missing declaration of struct timespec | expand

Commit Message

Samuel Thibault Nov. 9, 2024, 11:47 p.m. UTC
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 mbox series

Patch

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