diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-10 19:47:40 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-10 19:47:40 +0200 |
commit | 9ff471773884edf8a9630f7bf00f016a1950b3e7 (patch) | |
tree | 0ad6cd39a4219eb3f12067b4a38c5aa68c4db1f9 /src/system | |
parent | 0c1740982d4d1e2a7d945f0d59d0b207eda55485 (diff) |
system/fd_util: remove unused function accept_cloexec_nonblock()
Diffstat (limited to 'src/system')
-rw-r--r-- | src/system/fd_util.c | 28 | ||||
-rw-r--r-- | src/system/fd_util.h | 8 |
2 files changed, 0 insertions, 36 deletions
diff --git a/src/system/fd_util.c b/src/system/fd_util.c index 72c1e830c..b6ad0ebdb 100644 --- a/src/system/fd_util.c +++ b/src/system/fd_util.c @@ -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 diff --git a/src/system/fd_util.h b/src/system/fd_util.h index 4442f32b4..b7cbd98ee 100644 --- a/src/system/fd_util.h +++ b/src/system/fd_util.h @@ -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 |