Skip to content

Commit f9fea12

Browse files
piscisaureusry
authored andcommitted
Fix windows build
1 parent 068b733 commit f9fea12

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/node_file.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ static Persistent<String> buf_symbol;
5353

5454

5555
static inline bool SetCloseOnExec(int fd) {
56+
#ifdef __POSIX__
5657
return (fcntl(fd, F_SETFD, FD_CLOEXEC) != -1);
58+
#else // __MINGW32__
59+
/* no-op on windows */
60+
return false;
61+
#endif
5762
}
5863

5964

0 commit comments

Comments
 (0)