aboutsummaryrefslogtreecommitdiff
path: root/src/fd_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fd_util.c')
-rw-r--r--src/fd_util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fd_util.c b/src/fd_util.c
index 882b4c7d..9807cd16 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -45,7 +45,7 @@
#include <sys/socket.h>
#endif
-#ifdef HAVE_INOTIFY_INIT
+#if HAVE_INOTIFY_INIT
#include <sys/inotify.h>
#endif
@@ -141,7 +141,7 @@ pipe_cloexec(int fd[2])
#else
int ret;
-#ifdef HAVE_PIPE2
+#if HAVE_PIPE2
ret = pipe2(fd, O_CLOEXEC);
if (ret >= 0 || errno != ENOSYS)
return ret;
@@ -165,7 +165,7 @@ pipe_cloexec_nonblock(int fd[2])
#else
int ret;
-#ifdef HAVE_PIPE2
+#if HAVE_PIPE2
ret = pipe2(fd, O_CLOEXEC|O_NONBLOCK);
if (ret >= 0 || errno != ENOSYS)
return ret;
@@ -258,7 +258,7 @@ accept_cloexec_nonblock(int fd, struct sockaddr *address,
int ret;
socklen_t address_length = *address_length_r;
-#ifdef HAVE_ACCEPT4
+#if HAVE_ACCEPT4
ret = accept4(fd, address, &address_length,
SOCK_CLOEXEC|SOCK_NONBLOCK);
if (ret >= 0 || errno != ENOSYS) {
@@ -306,14 +306,14 @@ recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags)
#endif
-#ifdef HAVE_INOTIFY_INIT
+#if HAVE_INOTIFY_INIT
int
inotify_init_cloexec(void)
{
int fd;
-#ifdef HAVE_INOTIFY_INIT1
+#if HAVE_INOTIFY_INIT1
fd = inotify_init1(IN_CLOEXEC);
if (fd >= 0 || errno != ENOSYS)
return fd;