From f6faff8960efd71cf42d45845b4dd50e0e9a2dd4 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Mon, 2 Feb 2015 16:17:42 +0000 Subject: [PATCH] tests: check for _USE_GNU and define sighandler_t is not (matching signal.h logic) --- src/tests/system/libroot/posix/signal_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/system/libroot/posix/signal_test.cpp b/src/tests/system/libroot/posix/signal_test.cpp index 04174537da..741148d5cc 100644 --- a/src/tests/system/libroot/posix/signal_test.cpp +++ b/src/tests/system/libroot/posix/signal_test.cpp @@ -21,6 +21,14 @@ typedef void (*sighandler_t)(int); # define ualarm(usec, interval) alarm(1) #endif +#if !defined(__USE_GNU) +// sighandler is a GNU extension. This matches the check +// in signal.h. We may want to use posix sigaction though +// in the future which is posix +typedef void (*sighandler_t)(int); +#endif + + const void* kUserDataMagic = (void *)0x12345678; static char sAlternateStack[SIGSTKSZ];