From: Paul Eggert Date: Fri, 19 Jun 2026 17:07:47 +0000 (-0700) Subject: fstatat: don’t mess with CFLAGS X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;ds=inline;p=thirdparty%2Fgnulib.git fstatat: don’t mess with CFLAGS * m4/fstatat.m4 (gl_FUNC_FSTATAT): Remove stray code left over from an aborted attempt to mess with CFLAGS. Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2026-06/msg00084.html --- diff --git a/ChangeLog b/ChangeLog index bc891e3581..6fd9e8ce38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2026-06-19 Paul Eggert + fstatat: don’t mess with CFLAGS + * m4/fstatat.m4 (gl_FUNC_FSTATAT): Remove stray code left + over from an aborted attempt to mess with CFLAGS. + Problem reported by Bruno Haible in: + https://lists.gnu.org/r/bug-gnulib/2026-06/msg00084.html + openat2-tests: port to NFS * tests/test-openat2.c (do_test_basic): Close fd before removing its file. This fixes a file descriptor leak, diff --git a/m4/fstatat.m4 b/m4/fstatat.m4 index ceeb211d34..b706c891a4 100644 --- a/m4/fstatat.m4 +++ b/m4/fstatat.m4 @@ -1,5 +1,5 @@ # fstatat.m4 -# serial 6 +# serial 7 dnl Copyright (C) 2004-2026 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,9 +70,7 @@ AC_DEFUN([gl_FUNC_FSTATAT], [0], [AC_CACHE_CHECK([whether fstatat+AT_EMPTY_PATH allows null file], [gl_cv_func_fstatat_null_file], - [gl_saved_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wno-nonnull" - AC_RUN_IFELSE( + [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include @@ -80,6 +78,8 @@ AC_DEFUN([gl_FUNC_FSTATAT], #ifndef AT_EMPTY_PATH #define AT_EMPTY_PATH 0 #endif + /* Don't check via -Wnonnull, as the problem could in + theory exist with compilers lacking -Wnonnull. */ #if __GLIBC__ && ! (2 < __GLIBC__ + (41 <= __GLIBC_MINOR__)) #error "glibc 2.40 and earlier can fail with null file" #endif