Commit 5a495cc1 authored by Max Kellermann's avatar Max Kellermann

system/fd_util: remove unused function close_socket()

parent 9ff47177
...@@ -78,6 +78,8 @@ fd_set_cloexec(int fd, bool enable) ...@@ -78,6 +78,8 @@ fd_set_cloexec(int fd, bool enable)
#endif #endif
} }
#ifndef WIN32
/** /**
* Enables non-blocking mode for the specified file descriptor. On * Enables non-blocking mode for the specified file descriptor. On
* WIN32, this function only works for sockets. * WIN32, this function only works for sockets.
...@@ -101,6 +103,8 @@ fd_set_nonblock(int fd) ...@@ -101,6 +103,8 @@ fd_set_nonblock(int fd)
#endif #endif
} }
#endif
int int
pipe_cloexec_nonblock(int fd[2]) pipe_cloexec_nonblock(int fd[2])
{ {
...@@ -127,13 +131,3 @@ pipe_cloexec_nonblock(int fd[2]) ...@@ -127,13 +131,3 @@ pipe_cloexec_nonblock(int fd[2])
return ret; return ret;
#endif #endif
} }
int
close_socket(int fd)
{
#ifdef WIN32
return closesocket(fd);
#else
return close(fd);
#endif
}
...@@ -64,12 +64,6 @@ fd_set_cloexec(int fd, bool enable); ...@@ -64,12 +64,6 @@ fd_set_cloexec(int fd, bool enable);
int int
pipe_cloexec_nonblock(int fd[2]); pipe_cloexec_nonblock(int fd[2]);
/**
* Portable wrapper for close(); use closesocket() on WIN32/WinSock.
*/
int
close_socket(int fd);
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment