[113823] trunk/base/src/darwintracelib1.0/proc.c

cal at macports.org cal at macports.org
Sun Nov 24 05:08:18 PST 2013


Revision: 113823
          https://trac.macports.org/changeset/113823
Author:   cal at macports.org
Date:     2013-11-24 05:08:18 -0800 (Sun, 24 Nov 2013)
Log Message:
-----------
darwintrace1.0: Only override posix_spawn if the system actually has it, closes #41519

Modified Paths:
--------------
    trunk/base/src/darwintracelib1.0/proc.c

Modified: trunk/base/src/darwintracelib1.0/proc.c
===================================================================
--- trunk/base/src/darwintracelib1.0/proc.c	2013-11-24 13:07:43 UTC (rev 113822)
+++ trunk/base/src/darwintracelib1.0/proc.c	2013-11-24 13:08:18 UTC (rev 113823)
@@ -42,7 +42,6 @@
 #include <dlfcn.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <spawn.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/param.h>
@@ -51,6 +50,10 @@
 #include <sys/uio.h>
 #include <unistd.h>
 
+#if defined(HAVE_SPAWN_H) && defined(HAVE_POSIX_SPAWN)
+#include <spawn.h>
+#endif
+
 static void store_env() __attribute__((constructor));
 
 /**
@@ -286,6 +289,7 @@
 #undef execve
 }
 
+#if defined(HAVE_SPAWN_H) && defined(HAVE_POSIX_SPAWN)
 // Let's save some typing work...
 typedef int (*posix_spawn_t)(
 			pid_t *restrict,
@@ -350,3 +354,4 @@
 
 	return result;
 }
+#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131124/d5323e5a/attachment.html>


More information about the macports-changes mailing list