From 290331834d4f200042e01da78e38ff944a55703c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 17 Dec 2019 09:51:22 +0100 Subject: [PATCH] glob: Avoid warning on mingw. Reported by Christian Biesinger in . * lib/glob.c (__stat64): Undefine first. --- ChangeLog | 7 +++++++ lib/glob.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 41d8be0edd..5e6677fa0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-12-17 Bruno Haible + + glob: Avoid warning on mingw. + Reported by Christian Biesinger in + . + * lib/glob.c (__stat64): Undefine first. + 2019-12-17 Paul Eggert xalloc: tune xzalloc for fresh allocations diff --git a/lib/glob.c b/lib/glob.c index 9ecc5150a9..fae6e6175a 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -72,6 +72,10 @@ # define __glob glob # define __getlogin_r(buf, len) getlogin_r (buf, len) # define __lstat64(fname, buf) lstat (fname, buf) +# ifdef __MINGW32__ + /* Avoid GCC warning. mingw has an unused __stat64 macro. */ +# undef __stat64 +# endif # define __stat64(fname, buf) stat (fname, buf) # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) # define struct_stat64 struct stat -- 2.39.5