blob: 6bd2e5470c4a2207242696fe5e342fa816b97c87 (
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
|
Fix compilation on Gentoo/FreeBSD, no alloca.h here and PATH_MAX
is defined elsewhere.
See bug 254795
--- logrotate-3.7.7.orig/config.c
+++ logrotate-3.7.7/config.c
@@ -1,5 +1,7 @@
#include <sys/queue.h>
+#ifndef NO_ALLOCA_H
#include <alloca.h>
+#endif /* NO_ALLOCA_H */
#include <ctype.h>
#include <dirent.h>
#include <errno.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.7.7.orig/logrotate.c
+++ logrotate-3.7.7/logrotate.c
@@ -1,5 +1,7 @@
#include <sys/queue.h>
+#ifndef NO_ALLOCA_H
#include <alloca.h>
+#endif /* NO_ALLOCA_H */
#include <ctype.h>
#include <dirent.h>
#include <errno.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"
|