From f9fea12555c4d7cd63ffe8605d4fa0656e37bc9d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Tue, 25 Jan 2011 03:49:03 +0100 Subject: [PATCH] Fix windows build --- src/node_file.cc | 5 +++++ 1 file changed, 5 insertions(+) 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 }