summaryrefslogtreecommitdiff
blob: 3dc9a9c447d88a5f2cfde9584490621318625b16 (plain)
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
58
59
Fix compilation on Gentoo/FreeBSD, no alloca.h here and PATH_MAX
is defined elsewhere.

See bug 254795

--- logrotate-3.8.2.orig/config.c
+++ logrotate-3.8.2/config.c
@@ -1,6 +1,6 @@
 #include <sys/queue.h>
 /* Alloca is defined in stdlib.h in NetBSD */
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
 #include <alloca.h>
 #endif
 #include <limits.h>
@@ -21,6 +21,9 @@
 #include <wctype.h>
 #include <fnmatch.h>
 
+#if !defined(PATH_MAX) && defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
 #include "basenames.h"
 #include "log.h"
 #include "logrotate.h"
--- logrotate-3.8.2.orig/logrotate.c
+++ logrotate-3.8.2/logrotate.c
@@ -1,6 +1,6 @@
 #include <sys/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,9 @@
 int selinux_enforce = 0;
 #endif
 
+#if !defined(PATH_MAX) && defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
 #include "basenames.h"
 #include "log.h"
 #include "logrotate.h"

--- logrotate-3.8.2.orig/Makefile
+++ logrotate-3.8.2/Makefile
@@ -17,8 +17,10 @@
 
 ifeq ($(WITH_ACL),yes)
 CFLAGS += -DWITH_ACL
+ifneq ($(OS_NAME),FreeBSD)
 LOADLIBES += -lacl
 endif
+endif
 
 # HP-UX using GCC
 ifeq ($(OS_NAME),HP-UX)