summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-09-20 17:22:31 (GMT)
committerGitHub <noreply@github.com>2016-09-20 17:22:31 (GMT)
commit067e187a7f65fd64f3252ea4adc09e94d2ed404e (patch)
treefe8b8dc69e335c1e0d6485f102f98d247fd3b46d
parent94fc14314501a78b1742e910f7c920188b2753da (diff)
parent965e549b8dc08f0692ae8f5b33cbe957118c46bd (diff)
downloadNinja-067e187a7f65fd64f3252ea4adc09e94d2ed404e.zip
Ninja-067e187a7f65fd64f3252ea4adc09e94d2ed404e.tar.gz
Ninja-067e187a7f65fd64f3252ea4adc09e94d2ed404e.tar.bz2
Merge pull request #1185 from gahr/freebsd-ppoll
FreeBSD supports ppoll(2)
-rwxr-xr-xconfigure.py2
-rw-r--r--src/subprocess-posix.cc7
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 84218b9..9ec368f 100755
--- a/configure.py
+++ b/configure.py
@@ -98,7 +98,7 @@ class Platform(object):
return self._platform in ('freebsd', 'openbsd', 'bitrig')
def supports_ppoll(self):
- return self._platform in ('linux', 'openbsd', 'bitrig')
+ return self._platform in ('freebsd', 'linux', 'openbsd', 'bitrig')
def supports_ninja_browse(self):
return (not self.is_windows()
diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc
index 5ffe85b..3c81b7f 100644
--- a/src/subprocess-posix.cc
+++ b/src/subprocess-posix.cc
@@ -24,6 +24,13 @@
#include <sys/wait.h>
#include <spawn.h>
+#ifdef __FreeBSD__
+# include <sys/param.h>
+# if defined USE_PPOLL && __FreeBSD_version < 1002000
+# undef USE_PPOLL
+# endif
+#endif
+
extern char** environ;
#include "util.h"