[utils] Don't enable usage of sigaction unless the function is available.
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 8 Jan 2015 16:57:45 +0000 (11:57 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 8 Jan 2015 17:33:47 +0000 (12:33 -0500)
mono/utils/mono-context.h

index 3b01b49f0669d5f0abcd4c6ca1f010c59c26ea4b..d96eb759ef290aab6c5266270a468d463b14510b 100755 (executable)
@@ -30,7 +30,9 @@
 /*HACK, move this to an eventual mono-signal.c*/
 #if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
        defined(__FreeBSD__) || defined(__OpenBSD__)
-#define MONO_SIGNAL_USE_SIGACTION
+#ifdef HAVE_SIGACTION
+#define MONO_SIGNAL_USE_SIGACTION 1
+#endif
 #endif
 
 #if defined(__native_client__)
@@ -148,7 +150,9 @@ typedef struct {
 
 #if !defined( HOST_WIN32 ) && !defined(__native_client__) && !defined(__native_client_codegen__)
 
+#ifdef HAVE_SIGACTION
 #define MONO_SIGNAL_USE_SIGACTION 1
+#endif
 
 #endif