aboutsummaryrefslogtreecommitdiffstats
path: root/src/system/fd_util.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-03 17:03:21 +0100
committerMax Kellermann <max@duempel.org>2015-03-03 17:14:30 +0100
commit40a587bbaff38bb0b60313c24b94e2ecd53b181c (patch)
treed72c9db82e0db482ebe054119460b506433e9d05 /src/system/fd_util.c
parent818d729d8b60a682e267ac408c710f5851389d79 (diff)
downloadmpd-40a587bbaff38bb0b60313c24b94e2ecd53b181c.tar.gz
mpd-40a587bbaff38bb0b60313c24b94e2ecd53b181c.tar.xz
mpd-40a587bbaff38bb0b60313c24b94e2ecd53b181c.zip
system/FileDescriptor: new wrapper class for a file descriptor
Diffstat (limited to '')
-rw-r--r--src/system/fd_util.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/system/fd_util.c b/src/system/fd_util.c
index 440d5b142..5763ede90 100644
--- a/src/system/fd_util.c
+++ b/src/system/fd_util.c
@@ -41,10 +41,6 @@
#include <sys/socket.h>
#endif
-#ifdef HAVE_INOTIFY_INIT
-#include <sys/inotify.h>
-#endif
-
#ifdef USE_EVENTFD
#include <sys/eventfd.h>
#endif
@@ -200,38 +196,6 @@ accept_cloexec_nonblock(int fd, struct sockaddr *address,
return ret;
}
-#ifdef HAVE_INOTIFY_INIT
-
-int
-inotify_init_cloexec(void)
-{
- int fd;
-
-#ifdef HAVE_INOTIFY_INIT1
- fd = inotify_init1(IN_CLOEXEC);
- if (fd >= 0 || errno != ENOSYS)
- return fd;
-#endif
-
- fd = inotify_init();
- if (fd >= 0)
- fd_set_cloexec(fd, true);
-
- return fd;
-}
-
-#endif
-
-#ifdef USE_EVENTFD
-
-int
-eventfd_cloexec_nonblock(unsigned initval, int flags)
-{
- return eventfd(initval, flags | EFD_CLOEXEC | EFD_NONBLOCK);
-}
-
-#endif
-
int
close_socket(int fd)
{