aboutsummaryrefslogtreecommitdiffstats
path: root/src/fd_util.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-20 08:47:06 +0200
committerMax Kellermann <max@duempel.org>2011-09-20 08:47:06 +0200
commit921553d7bb38345ba99c069fa1ee7816d5130c9b (patch)
tree879a0384b9a4bc93e9b3c3c476812c660b7e63b4 /src/fd_util.h
parent27946a981ff4192f064feb3117567463c137933f (diff)
parentc476819cb1186770b1b7395851e394caac39cbc8 (diff)
downloadmpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.tar.gz
mpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.tar.xz
mpd-921553d7bb38345ba99c069fa1ee7816d5130c9b.zip
Merge branch 'v0.16.x'
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 96ad784d4..dd4df7a13 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