diff options
Diffstat (limited to 'src/system/fd_util.c')
-rw-r--r-- | src/system/fd_util.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/system/fd_util.c b/src/system/fd_util.c index b6ad0ebdb..ef3b57cd7 100644 --- a/src/system/fd_util.c +++ b/src/system/fd_util.c @@ -78,6 +78,8 @@ fd_set_cloexec(int fd, bool enable) #endif } +#ifndef WIN32 + /** * Enables non-blocking mode for the specified file descriptor. On * WIN32, this function only works for sockets. @@ -101,6 +103,8 @@ fd_set_nonblock(int fd) #endif } +#endif + int pipe_cloexec_nonblock(int fd[2]) { @@ -127,13 +131,3 @@ pipe_cloexec_nonblock(int fd[2]) return ret; #endif } - -int -close_socket(int fd) -{ -#ifdef WIN32 - return closesocket(fd); -#else - return close(fd); -#endif -} |