aboutsummaryrefslogtreecommitdiffstats
path: root/src/fd_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fd_util.c')
-rw-r--r--src/fd_util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fd_util.c b/src/fd_util.c
index 36f6e2fc9..882b4c7d5 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -327,3 +327,13 @@ inotify_init_cloexec(void)
}
#endif
+
+int
+close_socket(int fd)
+{
+#ifdef WIN32
+ return closesocket(fd);
+#else
+ return close(fd);
+#endif
+}