* 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. --- ChangeLog | 5 +++-- modules/fcntl-safer-tests | 2 ++ tests/test-fcntl-safer.c | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-)
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 <errno.h> #include <stdio.h> +#include <sys/stat.h> #include <unistd.h> +#if HAVE_DECL_ALARM +# include <signal.h> +#endif + #include "macros.h" #define BASE "test-fcntl-safer.t" -- 2.48.1