This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][BZ 18234] struct stat is not posix conform
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Wed, 20 May 2015 16:20:55 +0100
- Subject: [PATCH][BZ 18234] struct stat is not posix conform
- Authentication-results: sourceware.org; auth=none
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