This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ 18234] struct stat is not posix conform


the generic definition of struct stat on linux miss the
st_atim, st_mtim and st_ctim members when _POSIX_C_SOURCE
is defined (affects at least aarch64 and arm).

i did not see regressions on aarch64.

2015-05-20  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	[BZ #18234]
	* sysdeps/unix/sysv/linux/generic/bits/stat.h (struct stat): Make
	st_atim, st_ctim, st_mtim visible under __USE_XOPEN2K8.
diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h
index 42cb198..82e6b1d 100644
--- a/sysdeps/unix/sysv/linux/generic/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h
@@ -66,7 +66,7 @@ struct stat
     __blksize_t st_blksize;	/* Optimal block size for I/O.  */
     int __pad2;
     __field64(__blkcnt_t, __blkcnt64_t, st_blocks);  /* 512-byte blocks */
-#ifdef __USE_MISC
+#ifdef __USE_XOPEN2K8
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used
        whenever possible but the Unix namespace rules do not allow the

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]