[utils] More portability cleanups.
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 8 Jan 2015 17:27:04 +0000 (12:27 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 8 Jan 2015 17:33:48 +0000 (12:33 -0500)
mono/utils/mono-mmap.c
mono/utils/mono-time.c

index ed11c9f1b2874664035bc5d2b4a12be41499fafa..f200a266125ec47da6ec3dadcefaf8a47e3be385 100644 (file)
 #if HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
 #include <fcntl.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <signal.h>
 #include <errno.h>
 #endif
 
index 2bf306e49d241a9d76c9246dac63c85446c6799d..110d4dba3a7661cf81fee2a7beae1789bbe7fe42 100644 (file)
@@ -65,7 +65,7 @@ mono_100ns_datetime (void)
 #include <sys/time.h>
 #endif
 
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined (HAVE_SYS_PARAM_H)
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #endif
@@ -80,7 +80,7 @@ mono_100ns_datetime (void)
 static gint64
 get_boot_time (void)
 {
-#if defined(PLATFORM_MACOSX) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined (HAVE_SYS_PARAM_H)
        int mib [2];
        size_t size;
        time_t now;