aboutsummaryrefslogtreecommitdiff
path: root/src/fd_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fd_util.h')
-rw-r--r--src/fd_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fd_util.h b/src/fd_util.h
index 96ad784d..dd4df7a1 100644
--- a/src/fd_util.h
+++ b/src/fd_util.h
@@ -36,6 +36,8 @@
#ifndef FD_UTIL_H
#define FD_UTIL_H
+#include "check.h"
+
#include <stdbool.h>
#include <stddef.h>
@@ -127,6 +129,8 @@ recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags);
#endif
+#ifdef HAVE_INOTIFY_INIT
+
/**
* Wrapper for inotify_init(), which sets the CLOEXEC flag (atomically
* if supported by the OS).
@@ -135,3 +139,11 @@ int
inotify_init_cloexec(void);
#endif
+
+/**
+ * Portable wrapper for close(); use closesocket() on WIN32/WinSock.
+ */
+int
+close_socket(int fd);
+
+#endif