Skip to content

Commit

Permalink
Merge pull request ninja-build#359 from tedv/old-arch
Browse files Browse the repository at this point in the history
Fix missing POLLRDHUP constant on older systems.
  • Loading branch information
evmar committed Jul 11, 2012
2 parents b90d038 + 9bcd0d6 commit c7a3e30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/subprocess.cc
Expand Up @@ -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) {
Expand Down

0 comments on commit c7a3e30

Please sign in to comment.