From: Paul Eggert Date: Wed, 28 May 2025 19:31:45 +0000 (-0700) Subject: fcntl-safer-tests: also update this for fifos X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a12fa9db035ede86f361409108f0d4a6adce0b9;p=thirdparty%2Fgnulib.git fcntl-safer-tests: also update this for fifos * modules/fcntl-safer-tests (Depends-on): Add mkfifo. (configure.ac) Check for alarm decl. * tests/test-fcntl-safer.c: Include sys/stat.h, for mkfifo. [HAVE_DECL_ALARM]: Include signal.h, for alarm. --- diff --git a/ChangeLog b/ChangeLog index 4e26800c33..18123ef0c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,9 +16,10 @@ * lib/openat.c: Remove a few more unnecessary differences from open.c. * modules/open (Depends-on): Depend on lstat. * modules/openat (Depends-on): Add fstatat. - * modules/open-tests, modules/openat-tests: + * modules/fcntl-safer-tests, modules/open-tests, modules/openat-tests: + (Depends-on): Add mkfifo. (configure.ac) Check for alarm decl. - * tests/test-open.c, tests/test-openat.c: + * tests/test-fcntl-safer.c, tests/test-open.c, tests/test-openat.c: Include sys/stat.h, for mkfifo. [HAVE_DECL_ALARM]: Include signal.h, for alarm. * tests/test-open.h (test_open): Fail if test takes too long diff --git a/modules/fcntl-safer-tests b/modules/fcntl-safer-tests index b61b4a7ec7..795b491571 100644 --- a/modules/fcntl-safer-tests +++ b/modules/fcntl-safer-tests @@ -6,9 +6,11 @@ tests/macros.h Depends-on: bool fcntl +mkfifo symlink configure.ac: +AC_CHECK_DECLS_ONCE([alarm]) Makefile.am: TESTS += test-fcntl-safer diff --git a/tests/test-fcntl-safer.c b/tests/test-fcntl-safer.c index 2ead91d84e..db5f55da56 100644 --- a/tests/test-fcntl-safer.c +++ b/tests/test-fcntl-safer.c @@ -22,8 +22,13 @@ #include #include +#include #include +#if HAVE_DECL_ALARM +# include +#endif + #include "macros.h" #define BASE "test-fcntl-safer.t"