diff --git a/m4.include/mc-tests.m4 b/m4.include/mc-tests.m4 index 95e948bd7..257218ecb 100644 --- a/m4.include/mc-tests.m4 +++ b/m4.include/mc-tests.m4 @@ -42,6 +42,12 @@ AC_DEFUN([mc_UNIT_TESTS],[ fi AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes") + dnl sighandler_t is GNU extension + dnl AC_USE_SYSTEM_EXTENSIONS is reguired + AC_CHECK_TYPES([sighandler_t], [], [], [ + #include + ]) + # on cygwin, the linker does not accept the "-z" option case $host_os in cygwin*) diff --git a/tests/lib/utilunix__my_system-common.c b/tests/lib/utilunix__my_system-common.c index eba469276..22a096af5 100644 --- a/tests/lib/utilunix__my_system-common.c +++ b/tests/lib/utilunix__my_system-common.c @@ -28,6 +28,11 @@ #include "lib/vfs/vfs.h" +/* sighandler_t is GNU extension */ +#ifndef HAVE_SIGHANDLER_T +typedef void (*sighandler_t) (int); +#endif + /* --------------------------------------------------------------------------------------------- */ /* @CapturedValue */