Sfoglia il codice sorgente

Updates to preprocessiong and make files to build start-stop-daemon on OS X

Brian O'Neill 10 anni fa
parent
commit
e2855772ef
2 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 4 0
      tools/CMakeLists.txt
  2. 6 0
      tools/start-stop-daemon/start-stop-daemon.c

+ 4 - 0
tools/CMakeLists.txt

@@ -39,3 +39,7 @@ if ( CMAKE_SYSTEM MATCHES Linux )
     message ("-- Building start-stop-daemon")
     HPCC_ADD_SUBDIRECTORY (start-stop-daemon)
 endif()
+
+if (APPLE)
+    HPCC_ADD_SUBDIRECTORY (start-stop-daemon)
+endif (APPLE)

+ 6 - 0
tools/start-stop-daemon/start-stop-daemon.c

@@ -39,6 +39,8 @@
 #  define OSFreeBSD
 #elif defined(__NetBSD__)
 #  define OSNetBSD
+#elif defined(__APPLE__)
+#  define OSLinux
 #else
 #  error Unknown architecture - cannot build start-stop-daemon
 #endif
@@ -124,6 +126,10 @@
 #define HAVE_IOPRIO_SET
 #endif
 
+#if defined(__APPLE__)
+#undef _POSIX_PRIORITY_SCHEDULING
+#endif
+
 enum {
     IOPRIO_WHO_PROCESS = 1,
     IOPRIO_WHO_PGRP,