From: Paul Eggert Date: Wed, 6 Nov 2024 21:33:27 +0000 (-0800) Subject: opendirat: don’t depend on openat-safer X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0eb82479fb52a3efb16dab1e077b12522c63d7ef;p=gnulib.git opendirat: don’t depend on openat-safer * lib/opendirat.c: Include fcntl.h. [!GNULIB_OPENAT_SAFER]: Don’t include fcntl--.h. * modules/opendirat (Depends-on): Depend on openat, not openat-safer. --- diff --git a/ChangeLog b/ChangeLog index 87454b1325..68a6ebd3a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-11-06 Paul Eggert + opendirat: don’t depend on openat-safer + * lib/opendirat.c: Include fcntl.h. + [!GNULIB_OPENAT_SAFER]: Don’t include fcntl--.h. + * modules/opendirat (Depends-on): Depend on openat, not openat-safer. + getusershell: don’t depend on fopen-safer * lib/getusershell.c: Include stdio.h. [!GNULIB_FOPEN_SAFER]: Don’t include stdio--.h. diff --git a/lib/opendirat.c b/lib/opendirat.c index d2b567f8e7..269daf2423 100644 --- a/lib/opendirat.c +++ b/lib/opendirat.c @@ -22,9 +22,13 @@ #include #include -#include +#include #include +#ifdef GNULIB_OPENAT_SAFER +# include "fcntl--.h" +#endif + /* Relative to DIR_FD, open the directory DIR, passing EXTRA_FLAGS to the underlying openat call. On success, store into *PNEW_FD the underlying file descriptor of the newly opened directory and return diff --git a/modules/opendirat b/modules/opendirat index 17542ff4fa..61500512ee 100644 --- a/modules/opendirat +++ b/modules/opendirat @@ -10,7 +10,7 @@ c99 dirent fcntl-h fdopendir -openat-safer +openat configure.ac: