aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 56315e5079..123a1ea241 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1026,7 +1026,7 @@ tor_socketpair(int family, int type, int protocol, int fd[2])
#endif
r = socketpair(family, type, protocol, fd);
if (r == 0) {
-#ifndef SOCK_CLOEXEC
+#if !defined(SOCK_CLOEXEC) && defined(FD_CLOEXEC)
if (fd[0] >= 0)
fcntl(fd[0], F_SETFD, FD_CLOEXEC);
if (fd[1] >= 0)