diff --git a/src/node_file.cc b/src/node_file.cc index 83e07dcc5..5cc1f222d 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -53,7 +53,12 @@ static Persistent buf_symbol; static inline bool SetCloseOnExec(int fd) { +#ifdef __POSIX__ return (fcntl(fd, F_SETFD, FD_CLOEXEC) != -1); +#else // __MINGW32__ + /* no-op on windows */ + return false; +#endif }