From c752864b8101aa582883fdc5404fc7e5196a8bfc Mon Sep 17 00:00:00 2001 From: Ted Vessenes Date: Wed, 11 Jul 2012 10:49:16 -0400 Subject: [PATCH 1/2] Fix missing POLLRDHUP constant on older systems. Attempting to compile with g++ 4.1.2 failed because the POLLRDHUP constant was not defined when is included. --- src/subprocess.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/subprocess.cc b/src/subprocess.cc index 0d240b1a6f..fee842f648 100644 --- a/src/subprocess.cc +++ b/src/subprocess.cc @@ -25,6 +25,13 @@ #include #include +// Older versions of won't find this in . Some versions keep it in +// , 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) { From 9bcd0d667c17922fcc6144c5336d1890b2c7b6c5 Mon Sep 17 00:00:00 2001 From: Ted Vessenes Date: Wed, 11 Jul 2012 11:33:45 -0400 Subject: [PATCH 2/2] 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 fee842f648..1c47fd1342 100644 --- a/src/subprocess.cc +++ b/src/subprocess.cc @@ -25,9 +25,9 @@ #include #include -// Older versions of won't find this in . Some versions keep it in -// , though attempting to include that will redefine the -// pollfd structure. +// Older versions of glibc (like 2.4) won't find this in . glibc +// 2.4 keeps it in , though attempting to include that +// will redefine the pollfd structure. #ifndef POLLRDHUP #define POLLRDHUP 0x2000 #endif