--- src/pty.cc.orig 2016-01-30 10:31:41.000000000 -0800 +++ src/pty.cc 2016-01-30 10:33:32.000000000 -0800 @@ -60,6 +60,11 @@ #ifdef HAVE_PTY_H #include #endif + +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + #if defined(__sun) && defined(HAVE_STROPTS_H) #include #endif