system/fd_util: remove unused function close_socket()
This commit is contained in:
parent
9ff4717738
commit
5a495cc165
|
@ -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
|
||||
}
|
||||
|
|
|
@ -64,12 +64,6 @@ fd_set_cloexec(int fd, bool enable);
|
|||
int
|
||||
pipe_cloexec_nonblock(int fd[2]);
|
||||
|
||||
/**
|
||||
* Portable wrapper for close(); use closesocket() on WIN32/WinSock.
|
||||
*/
|
||||
int
|
||||
close_socket(int fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue