From 84f7ce84474c1648ce96884f1c91ca7b97ca3fc2 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 2 Mar 2021 20:17:07 -0300 Subject: posix: Add glob64 with 64-bit time_t support The glob might pass a different stat struct for gl_stat and gl_lstat when GLOB_ALTDIRFUNC is used. This requires add a new 64-bit time version that also uses 64-bit time stat functions. Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/glob64.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/sysv/linux/glob64.c') diff --git a/sysdeps/unix/sysv/linux/glob64.c b/sysdeps/unix/sysv/linux/glob64.c index 3cbadf3..572ca21 100644 --- a/sysdeps/unix/sysv/linux/glob64.c +++ b/sysdeps/unix/sysv/linux/glob64.c @@ -31,10 +31,12 @@ # define __glob __glob64 # define globfree(pglob) globfree64 (pglob) -# undef stat -# define stat stat64 - # define COMPILE_GLOB64 1 +# define struct_stat struct stat64 +# define struct_stat64 struct stat64 +# define GLOB_LSTAT gl_lstat +# define GLOB_STAT64 __stat64 +# define GLOB_LSTAT64 __lstat64 # include -- cgit v1.1