forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logrotate-3.9.1-fbsd.patch
57 lines (54 loc) · 1.36 KB
/
logrotate-3.9.1-fbsd.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff -Nuar a/config.c b/config.c
--- a/config.c 2015-06-28 13:54:18.309999889 +0200
+++ b/config.c 2015-06-28 13:56:49.599999885 +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 2015-04-03 09:39:35.000000000 +0200
+++ b/logrotate.c 2015-06-28 13:57:18.449999884 +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 +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 b/Makefile
--- a/Makefile 2015-04-03 09:39:35.000000000 +0200
+++ b/Makefile 2015-06-28 13:58:05.729999883 +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