1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

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.
This commit is contained in:
Bruce Evans 2002-07-10 05:21:14 +00:00
parent 616c044a9a
commit 5287ec6ef0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99711

View File

@ -58,6 +58,10 @@ typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */
#include <sys/time.h>
#endif
#ifdef _POSIX_SOURCE
#include <sys/_timespec.h>
#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