diff options
author | Nico Weber <thakis@chromium.org> | 2020-06-21 22:37:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 22:37:46 (GMT) |
commit | b1914048285d627027ccd5df801c7d43ede0c060 (patch) | |
tree | 8a2523e887fc0f88edd331c1b00e2e01577f0ad6 | |
parent | 8948ec2de60249deb756e02cf3c742f62f12aafe (diff) | |
download | Ninja-b1914048285d627027ccd5df801c7d43ede0c060.zip Ninja-b1914048285d627027ccd5df801c7d43ede0c060.tar.gz Ninja-b1914048285d627027ccd5df801c7d43ede0c060.tar.bz2 |
Include sys/select.h in subprocess-posix.cc
pselect() is in sys/select.h in "newer" (2001) versions of posix, so add an include for it.
While here, only include poll.h if USE_PPOLL is defined.
-rw-r--r-- | src/subprocess-posix.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc index fc5543e..74785d1 100644 --- a/src/subprocess-posix.cc +++ b/src/subprocess-posix.cc @@ -18,13 +18,18 @@ #include <assert.h> #include <errno.h> #include <fcntl.h> -#include <poll.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <sys/wait.h> #include <spawn.h> +#if defined(USE_PPOLL) +#include <poll.h> +#else +#include <sys/select.h> +#endif + extern char** environ; #include "util.h" |