Commit 9ff47177 authored by Max Kellermann's avatar Max Kellermann

system/fd_util: remove unused function accept_cloexec_nonblock()

parent 0c174098
......@@ -129,34 +129,6 @@ pipe_cloexec_nonblock(int fd[2])
}
int
accept_cloexec_nonblock(int fd, struct sockaddr *address,
size_t *address_length_r)
{
int ret;
socklen_t address_length = *address_length_r;
#ifdef HAVE_ACCEPT4
ret = accept4(fd, address, &address_length,
SOCK_CLOEXEC|SOCK_NONBLOCK);
if (ret >= 0 || errno != ENOSYS) {
if (ret >= 0)
*address_length_r = address_length;
return ret;
}
#endif
ret = accept(fd, address, &address_length);
if (ret >= 0) {
fd_set_cloexec(ret, true);
fd_set_nonblock(ret);
*address_length_r = address_length;
}
return ret;
}
int
close_socket(int fd)
{
#ifdef WIN32
......
......@@ -65,14 +65,6 @@ int
pipe_cloexec_nonblock(int fd[2]);
/**
* Wrapper for accept(), which sets the CLOEXEC and the NONBLOCK flags
* (atomically if supported by the OS).
*/
int
accept_cloexec_nonblock(int fd, struct sockaddr *address,
size_t *address_length_r);
/**
* Portable wrapper for close(); use closesocket() on WIN32/WinSock.
*/
int
......
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