summaryrefslogtreecommitdiffstats
path: root/src/subprocess.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-11-07 18:17:08 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-11-07 18:17:08 (GMT)
commit82a68c96f4b02b68a41d8ad5d0acac86acba4e32 (patch)
treee5031e7d052828864a6b1a0cd904165ebab07164 /src/subprocess.h
parent7cffca297227edde0e79c2d4357719c6e345b291 (diff)
downloadNinja-82a68c96f4b02b68a41d8ad5d0acac86acba4e32.zip
Ninja-82a68c96f4b02b68a41d8ad5d0acac86acba4e32.tar.gz
Ninja-82a68c96f4b02b68a41d8ad5d0acac86acba4e32.tar.bz2
Only run SubprocessTest.SetWithLots on FreeBSD when ppoll() exists.
Should fix #1189 after #1185.
Diffstat (limited to 'src/subprocess.h')
-rw-r--r--src/subprocess.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/subprocess.h b/src/subprocess.h
index 51f40b2..b2d486c 100644
--- a/src/subprocess.h
+++ b/src/subprocess.h
@@ -26,6 +26,14 @@ using namespace std;
#include <signal.h>
#endif
+// ppoll() exists on FreeBSD, but only on newer versions.
+#ifdef __FreeBSD__
+# include <sys/param.h>
+# if defined USE_PPOLL && __FreeBSD_version < 1002000
+# undef USE_PPOLL
+# endif
+#endif
+
#include "exit_status.h"
/// Subprocess wraps a single async subprocess. It is entirely