* m4/openat2.m4 (gl_FUNC_OPENAT2): The recent ‘fcntl-h: glibc now
has openat2’ patch changed HAVE_OPENAT2’s default to 1.  Adjust to
this here by setting it to 0 when openat2 is not found, rather than
setting it to 1 when it is found.
---
 ChangeLog     | 6 ++++++
 m4/openat2.m4 | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a3096cefeb..ee4fcf6978 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2026-06-16  Paul Eggert  <[email protected]>
 
+       openat2: set HAVE_OPENAT2=0 if openat2 is missing
+       * m4/openat2.m4 (gl_FUNC_OPENAT2): The recent ‘fcntl-h: glibc now
+       has openat2’ patch changed HAVE_OPENAT2’s default to 1.  Adjust to
+       this here by setting it to 0 when openat2 is not found, rather than
+       setting it to 1 when it is found.
+
        fchownat: don’t mishandle AT_EMPTY_PATH
        This has the same motivation as the recent fchmodat change.
        * lib/fchownat.c (AT_EMPTY_PATH): Default to 0.
diff --git a/m4/openat2.m4 b/m4/openat2.m4
index c35e32533d..c58276f4c3 100644
--- a/m4/openat2.m4
+++ b/m4/openat2.m4
@@ -1,5 +1,5 @@
 # openat2.m4
-# serial 1
+# serial 2
 
 dnl Copyright 2025-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -16,7 +16,7 @@ AC_DEFUN([gl_FUNC_OPENAT2],
   AC_REQUIRE([gl_FCNTL_O_FLAGS])
   AC_CHECK_FUNCS_ONCE([openat2])
   AS_CASE([$ac_cv_func_openat2],
-    [yes], [HAVE_OPENAT2=1])
+    [no], [HAVE_OPENAT2=0])
 ])
 
 # Prerequisites of lib/openat2.c.
-- 
2.53.0


Reply via email to