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 1f3004d0c..4636c19e4 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -304,3 +304,13 @@ inotify_init_cloexec(void)
}
#endif
+
+int
+close_socket(int fd)
+{
+#ifdef WIN32
+ return closesocket(fd);
+#else
+ return close(fd);
+#endif
+}