summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-08-10 19:47:57 +0200
committerMax Kellermann <max@musicpd.org>2017-08-10 19:47:57 +0200
commit5a495cc165c2465ad480ac863006599d7a1c3ad1 (patch)
tree750250f5e8c0ee46e4119d3ab089c9f16369aeab /src
parent9ff471773884edf8a9630f7bf00f016a1950b3e7 (diff)
system/fd_util: remove unused function close_socket()
Diffstat (limited to 'src')
-rw-r--r--src/system/fd_util.c14
-rw-r--r--src/system/fd_util.h6
2 files changed, 4 insertions, 16 deletions
diff --git a/src/system/fd_util.c b/src/system/fd_util.c
index b6ad0ebdb..ef3b57cd7 100644
--- a/src/system/fd_util.c
+++ b/src/system/fd_util.c
@@ -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
-}
diff --git a/src/system/fd_util.h b/src/system/fd_util.h
index b7cbd98ee..9ed193e12 100644
--- a/src/system/fd_util.h
+++ b/src/system/fd_util.h
@@ -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