diff options
author | Ted Vessenes <tvessene@akamai.com> | 2012-07-11 14:49:16 (GMT) |
---|---|---|
committer | Ted Vessenes <tvessene@akamai.com> | 2012-07-11 14:56:38 (GMT) |
commit | c752864b8101aa582883fdc5404fc7e5196a8bfc (patch) | |
tree | 84ecf8150e64c210ce5b5eb7b0080853cc107382 | |
parent | b90d0387fb821a9f9fc0e15473cd00b1fb89c550 (diff) | |
download | Ninja-c752864b8101aa582883fdc5404fc7e5196a8bfc.zip Ninja-c752864b8101aa582883fdc5404fc7e5196a8bfc.tar.gz Ninja-c752864b8101aa582883fdc5404fc7e5196a8bfc.tar.bz2 |
Fix missing POLLRDHUP constant on older systems.
Attempting to compile with g++ 4.1.2 failed because the POLLRDHUP
constant was not defined when <poll.h> is included.
-rw-r--r-- | src/subprocess.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/subprocess.cc b/src/subprocess.cc index 0d240b1..fee842f 100644 --- a/src/subprocess.cc +++ b/src/subprocess.cc @@ -25,6 +25,13 @@ #include <string.h> #include <sys/wait.h> +// Older versions of won't find this in <poll.h>. Some versions keep it in +// <asm-generic/poll.h>, though attempting to include that will redefine the +// pollfd structure. +#ifndef POLLRDHUP +#define POLLRDHUP 0x2000 +#endif + #include "util.h" Subprocess::Subprocess() : fd_(-1), pid_(-1) { |