From bc0fd33965e54aa0fe4d5a89c266629a43dce59e Mon Sep 17 00:00:00 2001 From: bde Date: Wed, 10 Jul 2002 05:21:14 +0000 Subject: Fixed compiling with -D_POSIX_SOURCE. The previous commit was supposed to fix this, but actually broke it a little differently by adding 2 invalid references to struct timespec while fixing 1. --- sys/sys/stat.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/sys/stat.h b/sys/sys/stat.h index ea7c740..9452dd3 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -58,6 +58,10 @@ typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */ #include #endif +#ifdef _POSIX_SOURCE +#include +#endif + #ifdef _KERNEL #define __dev_t udev_t #else @@ -112,10 +116,6 @@ struct stat { int32_t st_lspare; #ifndef _POSIX_SOURCE struct timespec st_createtimespec; /* time of file creation */ -#else - time_t st_createtime; /* time of file creation */ - long st_createtimensec; /* nsec of file creation */ -#endif /* * Explicitly pad st_createtimespec to 16 bytes so that the size of * struct stat is backwards compatible. We use bitfields instead @@ -126,6 +126,12 @@ struct stat { */ int :(8 / 2) * (16 - (int)sizeof(struct timespec)); int :(8 / 2) * (16 - (int)sizeof(struct timespec)); +#else + time_t st_createtime; /* time of file creation */ + long st_createtimensec; /* nsec of file creation */ + int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); + int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); +#endif }; #ifndef _POSIX_SOURCE -- cgit v1.1