From c752864b8101aa582883fdc5404fc7e5196a8bfc Mon Sep 17 00:00:00 2001
From: Ted Vessenes <tvessene@akamai.com>
Date: Wed, 11 Jul 2012 10:49:16 -0400
Subject: 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.
---
 src/subprocess.cc | 7 +++++++
 1 file changed, 7 insertions(+)

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) {
-- 
cgit v0.12


From 9bcd0d667c17922fcc6144c5336d1890b2c7b6c5 Mon Sep 17 00:00:00 2001
From: Ted Vessenes <tvessene@akamai.com>
Date: Wed, 11 Jul 2012 11:33:45 -0400
Subject: Clarify comment wording.

---
 src/subprocess.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/subprocess.cc b/src/subprocess.cc
index fee842f..1c47fd1 100644
--- a/src/subprocess.cc
+++ b/src/subprocess.cc
@@ -25,9 +25,9 @@
 #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.
+// 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
-- 
cgit v0.12

