Pārlūkot izejas kodu

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

Brian O'Neill 10 gadi atpakaļ
vecāks
revīzija
e2855772ef
2 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  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,