On 3/30/22 16:40, Paul Eggert wrote:
I updated Gnulib to reflect this change; see first attached patch.
Oops, forgot to attach that patch. Here it is. Also cc'ing to bug-gnulib.
From 8fa9898afa5ee3da8f5d5a4797f98ae62b12d427 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Wed, 30 Mar 2022 16:29:11 -0700
Subject: [PATCH] glob: sync better with glibc
* lib/glob.c (dirfd) [_LIBC]: Use #undef instead of #ifdef.
Problem reported by DJ Delorie.
---
ChangeLog | 6 ++++++
lib/glob.c | 5 ++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7ea4f7797b..0f88fceed0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-03-30 Paul Eggert <egg...@cs.ucla.edu>
+
+ glob: sync better with glibc
+ * lib/glob.c (dirfd) [_LIBC]: Use #undef instead of #ifdef.
+ Problem reported by DJ Delorie.
+
2022-03-23 Paul Eggert <egg...@cs.ucla.edu>
glob: test for glibc bug 25659
diff --git a/lib/glob.c b/lib/glob.c
index 52c79b4cd8..f6993a3706 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -57,9 +57,8 @@
# define sysconf(id) __sysconf (id)
# define closedir(dir) __closedir (dir)
# define opendir(name) __opendir (name)
-# ifndef dirfd
-# define dirfd(str) __dirfd (str)
-# endif
+# undef dirfd
+# define dirfd(str) __dirfd (str)
# define readdir(str) __readdir64 (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
--
2.35.1