diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-02-26 09:59:27 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-15 10:42:11 -0300 |
commit | 372d2ef1f9ef67a679ae5143ab3bac8997b80160 (patch) | |
tree | 05ba66dbc2b337696eb351fe58117a1503465bdc /support/xunistd.h | |
parent | e9bc2b3b38ff8a68248cdfe91b0d28c154382ec2 (diff) | |
download | glibc-372d2ef1f9ef67a679ae5143ab3bac8997b80160.tar.gz glibc-372d2ef1f9ef67a679ae5143ab3bac8997b80160.tar.xz glibc-372d2ef1f9ef67a679ae5143ab3bac8997b80160.zip |
libsupport: Add 64-bit time_t support for stat functions
The patch adds redirections for xstat, xlstat, and xfstat when _TIME_BITS=64 is defined. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'support/xunistd.h')
-rw-r--r-- | support/xunistd.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/support/xunistd.h b/support/xunistd.h index c642588c29..e4ade65c85 100644 --- a/support/xunistd.h +++ b/support/xunistd.h @@ -24,6 +24,7 @@ #include <sys/cdefs.h> #include <sys/types.h> +#include <sys/stat.h> #include <unistd.h> __BEGIN_DECLS @@ -35,9 +36,21 @@ pid_t xwaitpid (pid_t, int *status, int flags); void xpipe (int[2]); void xdup2 (int, int); int xopen (const char *path, int flags, mode_t); +#ifndef __USE_TIME_BITS64 +# ifdef __USE_FILE_OFFSET64 +void xstat (const char *path, struct stat *); +void xlstat (const char *path, struct stat *); +void xfstat (int fd, struct stat *); +# else void xstat (const char *path, struct stat64 *); void xlstat (const char *path, struct stat64 *); void xfstat (int fd, struct stat64 *); +# endif +#else +void __REDIRECT (xstat, (const char *path, struct stat *), xstat_time64); +void __REDIRECT (xlstat, (const char *path, struct stat *), xlstat_time64); +void __REDIRECT (xfstat, (int fd, struct stat *), xfstat_time64); +#endif void xmkdir (const char *path, mode_t); void xchroot (const char *path); void xunlink (const char *path); |