summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/subprocess.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/subprocess.cc b/src/subprocess.cc
index 0d240b1..1c47fd1 100644
--- a/src/subprocess.cc
+++ b/src/subprocess.cc
@@ -25,6 +25,13 @@
#include <string.h>
#include <sys/wait.h>
+// Older versions of glibc (like 2.4) won't find this in <poll.h>. glibc
+// 2.4 keeps 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) {