Line 0
Link Here
|
|
|
1 |
--- src/mod_cgi.c.orig 2016-10-16 10:48:26 UTC |
2 |
+++ src/mod_cgi.c |
3 |
@@ -32,13 +32,14 @@ |
4 |
#include <signal.h> |
5 |
#include <ctype.h> |
6 |
#include <assert.h> |
7 |
+#include <sys/param.h> |
8 |
|
9 |
#include <stdio.h> |
10 |
#include <fcntl.h> |
11 |
|
12 |
-#ifdef O_CLOEXEC |
13 |
+#if defined(O_CLOEXEC) && __FreeBSD_version >= 1000032 |
14 |
#define pipe_cloexec(pipefd) pipe2((pipefd), O_CLOEXEC) |
15 |
-#elif defined FD_CLOEXEC |
16 |
+#elif defined(FD_CLOEXEC) |
17 |
#define pipe_cloexec(pipefd) \ |
18 |
( 0 == pipe(pipefd) \ |
19 |
&& 0 == fcntl(pipefd[0], F_SETFD, FD_CLOEXEC) \ |