diff options
author | J. Neuschäfer <j.neuschaefer@gmx.net> | 2024-07-27 18:47:09 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-07-27 19:18:25 +0200 |
commit | d0c8c185b439187b12644457bb2aa0326f25aaf7 (patch) | |
tree | c25bab89a78e24176124e6aa5f6dca24be9eb5fb /libc/sysdeps/linux/ia64/bits/stat.h | |
parent | 05b11809bd11450aff3d20e43f18415ce58601e7 (diff) |
bits/stat.h: Declare st_mtim if defined(__USE_XOPEN2K8), everywhere
While building software that sets _POSIX_C_SOURCE=200809L and uses
stat.st_mtim for ARM, it was noticed that st_mtim was not defined.
This seems to be because common/bits/stat.h was picked up, which does
not take __USE_XOPEN2K8 as a reason to enable st_mtim and related
fields. This appears to be an oversight, and porting the check from
common-generic/bits/stat.h to other architectures does indeed fix the
build issue.
This patch is based on commit 50bd6d06e ("Fix memory corruption due to
struct stat field").
Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>
Diffstat (limited to 'libc/sysdeps/linux/ia64/bits/stat.h')
-rw-r--r-- | libc/sysdeps/linux/ia64/bits/stat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/ia64/bits/stat.h b/libc/sysdeps/linux/ia64/bits/stat.h index 6723166e7..2b70b8cf8 100644 --- a/libc/sysdeps/linux/ia64/bits/stat.h +++ b/libc/sysdeps/linux/ia64/bits/stat.h @@ -38,7 +38,7 @@ struct stat int pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__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 @@ -77,7 +77,7 @@ struct stat64 int pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__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 |