[xbuild] Add support for multi-targeting arbitrary frameworks.
[mono.git] / support / signal.c
index 6acb78977e6ce84e68b90fc5823bff2207339620..abd76382f0bc5646fdef31b4e1060f083f26a28d 100644 (file)
 #ifndef HOST_WIN32
 #include <sys/time.h>
 #include <sys/types.h>
+#if defined(__APPLE__)
+#include "fakepoll.h"
+#else
 #include <poll.h>
+#endif
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
@@ -120,6 +124,7 @@ int Mono_Posix_FromRealTimeSignum (int offset, int *r)
        #define mph_int_set(p,o,n) do { *(p) = n; } while (0)
 #endif
 
+#if HAVE_PSIGNAL
 int
 Mono_Posix_Syscall_psignal (int sig, const char* s)
 {
@@ -127,6 +132,7 @@ Mono_Posix_Syscall_psignal (int sig, const char* s)
        psignal (sig, s);
        return errno == 0 ? 0 : -1;
 }
+#endif  /* def HAVE_PSIGNAL */
 
 #define NUM_SIGNALS 64
 static signal_info signals[NUM_SIGNALS];