1 |
naota 12/10/29 23:56:50 |
2 |
|
3 |
Added: logrotate-3.8.2-fbsd.patch |
4 |
Log: |
5 |
Add patch to allow build on FreeBSD-9.x. #439200 |
6 |
|
7 |
(Portage version: 2.2.0_alpha137/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-admin/logrotate/files/logrotate-3.8.2-fbsd.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/logrotate/files/logrotate-3.8.2-fbsd.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/logrotate/files/logrotate-3.8.2-fbsd.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: logrotate-3.8.2-fbsd.patch |
16 |
=================================================================== |
17 |
Fix compilation on Gentoo/FreeBSD, no alloca.h here and PATH_MAX |
18 |
is defined elsewhere. |
19 |
|
20 |
See bug 254795 |
21 |
|
22 |
--- logrotate-3.8.2.orig/config.c |
23 |
+++ logrotate-3.8.2/config.c |
24 |
@@ -1,6 +1,6 @@ |
25 |
#include <sys/queue.h> |
26 |
/* Alloca is defined in stdlib.h in NetBSD */ |
27 |
-#ifndef __NetBSD__ |
28 |
+#if !defined(__NetBSD__) && !defined(__FreeBSD__) |
29 |
#include <alloca.h> |
30 |
#endif |
31 |
#include <limits.h> |
32 |
@@ -21,6 +21,9 @@ |
33 |
#include <wctype.h> |
34 |
#include <fnmatch.h> |
35 |
|
36 |
+#if !defined(PATH_MAX) && defined(__FreeBSD__) |
37 |
+#include <sys/param.h> |
38 |
+#endif |
39 |
#include "basenames.h" |
40 |
#include "log.h" |
41 |
#include "logrotate.h" |
42 |
--- logrotate-3.8.2.orig/logrotate.c |
43 |
+++ logrotate-3.8.2/logrotate.c |
44 |
@@ -1,6 +1,6 @@ |
45 |
#include <sys/queue.h> |
46 |
/* alloca() is defined in stdlib.h in NetBSD */ |
47 |
-#ifndef __NetBSD__ |
48 |
+#if !defined(__NetBSD__) && !defined(__FreeBSD__) |
49 |
#include <alloca.h> |
50 |
#endif |
51 |
#include <limits.h> |
52 |
@@ -24,6 +24,9 @@ |
53 |
int selinux_enforce = 0; |
54 |
#endif |
55 |
|
56 |
+#if !defined(PATH_MAX) && defined(__FreeBSD__) |
57 |
+#include <sys/param.h> |
58 |
+#endif |
59 |
#include "basenames.h" |
60 |
#include "log.h" |
61 |
#include "logrotate.h" |
62 |
|
63 |
--- logrotate-3.8.2.orig/Makefile |
64 |
+++ logrotate-3.8.2/Makefile |
65 |
@@ -17,8 +17,10 @@ |
66 |
|
67 |
ifeq ($(WITH_ACL),yes) |
68 |
CFLAGS += -DWITH_ACL |
69 |
+ifneq ($(OS_NAME),FreeBSD) |
70 |
LOADLIBES += -lacl |
71 |
endif |
72 |
+endif |
73 |
|
74 |
# HP-UX using GCC |
75 |
ifeq ($(OS_NAME),HP-UX) |