You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch

58 lines
1.4 KiB

diff -Nuar a/config.c b/config.c
--- a/config.c 2016-08-03 23:19:33.730061240 +0200
+++ b/config.c 2016-08-03 23:20:31.200062397 +0200
@@ -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-08-03 12:25:47.000000000 +0200
+++ b/logrotate.c 2016-08-03 23:20:52.900062834 +0200
@@ -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 +27,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-08-03 12:25:47.000000000 +0200
+++ b/Makefile.legacy 2016-08-03 23:21:07.370063125 +0200
@@ -22,7 +22,9 @@
ifeq ($(WITH_ACL),yes)
CFLAGS += -DWITH_ACL
+ifneq ($(OS_NAME),FreeBSD)
LOADLIBES += -lacl
+endif
# See pretest
TEST_ACL=1
else