system/fd_util: remove unused function close_socket()

This commit is contained in:
Max Kellermann 2017-08-10 19:47:57 +02:00
parent 9ff4717738
commit 5a495cc165
2 changed files with 4 additions and 16 deletions

View File

@ -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)
#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])
return ret; return ret;
#endif #endif
} }
int
close_socket(int fd)
{
#ifdef WIN32
return closesocket(fd);
#else
return close(fd);
#endif
}

View File

@ -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