summaryrefslogtreecommitdiff
path: root/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch')
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
new file mode 100644
index 000000000000..f5aa65272b88
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
@@ -0,0 +1,57 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2016-12-02 23:33:36.768905615 +0100
++++ b/config.c 2016-12-02 23:36:15.568906130 +0100
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* Alloca is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -24,6 +24,10 @@
+ #include <fnmatch.h>
+ #include <sys/mman.h>
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2016-11-30 14:07:15.000000000 +0100
++++ b/logrotate.c 2016-12-02 23:36:44.218906223 +0100
+@@ -1,6 +1,6 @@
+ #include "queue.h"
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -26,6 +26,10 @@
+ #include <limits.h>
+ #endif
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
+diff -Nuar a/Makefile.legacy b/Makefile.legacy
+--- a/Makefile.legacy 2016-11-30 13:05:55.000000000 +0100
++++ b/Makefile.legacy 2016-12-02 23:37:33.938906384 +0100
+@@ -22,7 +22,9 @@
+
+ ifeq ($(WITH_ACL),yes)
+ CFLAGS += -DWITH_ACL
++ifneq ($(OS_NAME),FreeBSD)
+ LOADLIBES += -lacl
++endif
+ # See pretest
+ TEST_ACL=1
+ else