From fa7be879273c1b2cfd7a35b3157680b4164143d7 Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Thu, 3 Nov 2016 16:14:10 +0000 Subject: [PATCH] - Modify patch to check is we are on FreeBSD before checking __FreeBSD_version. [1] - Explicitly include param.h Suggested by: marino@ [1] --- www/lighttpd/Makefile | 2 +- www/lighttpd/files/patch-src_mod__cgi.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index 39dc81db39eb..223297105ba4 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -3,7 +3,7 @@ PORTNAME?= lighttpd PORTVERSION= 1.4.43 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= www MASTER_SITES?= http://download.lighttpd.net/lighttpd/releases-1.4.x/ diff --git a/www/lighttpd/files/patch-src_mod__cgi.c b/www/lighttpd/files/patch-src_mod__cgi.c index 8561d57d65d3..1348c04026bb 100644 --- a/www/lighttpd/files/patch-src_mod__cgi.c +++ b/www/lighttpd/files/patch-src_mod__cgi.c @@ -1,11 +1,13 @@ ---- src/mod_cgi.c.orig 2016-11-02 13:53:21 UTC +--- src/mod_cgi.c.orig 2016-10-31 13:16:40 UTC +++ src/mod_cgi.c -@@ -36,7 +36,7 @@ +@@ -35,8 +35,9 @@ + #include #include - ++#include + -#if defined(O_CLOEXEC) && (!defined(__FreeBSD__) || defined(F_DUPFD_CLOEXEC)) -+#if defined(O_CLOEXEC) && __FreeBSD_version >= 1000032 ++#if defined(O_CLOEXEC) && (!defined(__FreeBSD__) || __FreeBSD_version >= 1000032) #define pipe_cloexec(pipefd) pipe2((pipefd), O_CLOEXEC) #elif defined FD_CLOEXEC #define pipe_cloexec(pipefd) \