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