summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_cgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_cgi.c b/src/mod_cgi.c
index 8b0dd3ed..64d3b129 100644
--- a/src/mod_cgi.c
+++ b/src/mod_cgi.c
@@ -36,7 +36,7 @@
#include <stdio.h>
#include <fcntl.h>
-#ifdef O_CLOEXEC
+#if defined(O_CLOEXEC) && (!defined(__FreeBSD__) || defined(F_DUPFD_CLOEXEC))
#define pipe_cloexec(pipefd) pipe2((pipefd), O_CLOEXEC)
#elif defined FD_CLOEXEC
#define pipe_cloexec(pipefd) \