diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-20 23:32:24 -0700 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-03-24 14:10:18 -0400 |
commit | 62bf0f64d2807c3609703ef8de4d15b136ba9945 (patch) | |
tree | b4958f5fa2b6e7873b9fd4d983910b5f40e65722 | |
parent | b26bb1d79c546cd2cafdab2b1e7f79e6b3f126c3 (diff) | |
download | meta-openembedded-62bf0f64d2807c3609703ef8de4d15b136ba9945.tar.gz |
ipsec-tools: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch | 249 | ||||
-rw-r--r-- | meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb | 3 |
2 files changed, 251 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch new file mode 100644 index 000000000..630ecdb5f --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch | |||
@@ -0,0 +1,249 @@ | |||
1 | From 7d9585be093c9cb2428b373c0b0088bb778942d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 20 Mar 2017 21:37:47 -0700 | ||
4 | Subject: [PATCH] Fix header issues found with musl libc | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | src/libipsec/ipsec_strerror.h | 3 +++ | ||
9 | src/libipsec/libpfkey.h | 4 +++- | ||
10 | src/racoon/admin.c | 2 +- | ||
11 | src/racoon/backupsa.c | 6 +++--- | ||
12 | src/racoon/cftoken.l | 4 ++++ | ||
13 | src/racoon/logger.h | 3 +++ | ||
14 | src/racoon/misc.h | 3 +++ | ||
15 | src/racoon/missing/crypto/sha2/sha2.h | 3 +++ | ||
16 | src/racoon/netdb_dnssec.h | 3 +++ | ||
17 | src/racoon/pfkey.c | 1 - | ||
18 | src/racoon/plog.h | 2 ++ | ||
19 | src/racoon/str2val.h | 3 +++ | ||
20 | src/racoon/vmbuf.h | 3 +++ | ||
21 | src/setkey/extern.h | 3 ++- | ||
22 | src/setkey/setkey.c | 1 - | ||
23 | 15 files changed, 36 insertions(+), 8 deletions(-) | ||
24 | |||
25 | diff --git a/src/libipsec/ipsec_strerror.h b/src/libipsec/ipsec_strerror.h | ||
26 | index 2b4264f..dac66a1 100644 | ||
27 | --- a/src/libipsec/ipsec_strerror.h | ||
28 | +++ b/src/libipsec/ipsec_strerror.h | ||
29 | @@ -34,6 +34,9 @@ | ||
30 | #ifndef _IPSEC_STRERROR_H | ||
31 | #define _IPSEC_STRERROR_H | ||
32 | |||
33 | +#undef __P | ||
34 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
35 | + | ||
36 | extern int __ipsec_errcode; | ||
37 | extern void __ipsec_set_strerror __P((const char *)); | ||
38 | |||
39 | diff --git a/src/libipsec/libpfkey.h b/src/libipsec/libpfkey.h | ||
40 | index 61d2f2a..f7991b7 100644 | ||
41 | --- a/src/libipsec/libpfkey.h | ||
42 | +++ b/src/libipsec/libpfkey.h | ||
43 | @@ -34,6 +34,9 @@ | ||
44 | #ifndef _LIBPFKEY_H | ||
45 | #define _LIBPFKEY_H | ||
46 | |||
47 | +#undef __P | ||
48 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
49 | + | ||
50 | #ifndef KAME_LIBPFKEY_H | ||
51 | #define KAME_LIBPFKEY_H | ||
52 | |||
53 | @@ -43,7 +46,6 @@ | ||
54 | |||
55 | #define PRIORITY_OFFSET_POSITIVE_MAX 0x3fffffff | ||
56 | #define PRIORITY_OFFSET_NEGATIVE_MAX 0x40000000 | ||
57 | - | ||
58 | struct sadb_msg; | ||
59 | extern void pfkey_sadump __P((struct sadb_msg *)); | ||
60 | extern void pfkey_sadump_withports __P((struct sadb_msg *)); | ||
61 | diff --git a/src/racoon/admin.c b/src/racoon/admin.c | ||
62 | index 4b1875b..03ea3f8 100644 | ||
63 | --- a/src/racoon/admin.c | ||
64 | +++ b/src/racoon/admin.c | ||
65 | @@ -36,7 +36,6 @@ | ||
66 | #include <sys/types.h> | ||
67 | #include <sys/param.h> | ||
68 | #include <sys/socket.h> | ||
69 | -#include <sys/signal.h> | ||
70 | #include <sys/stat.h> | ||
71 | #include <sys/un.h> | ||
72 | |||
73 | @@ -46,6 +45,7 @@ | ||
74 | #include PATH_IPSEC_H | ||
75 | |||
76 | |||
77 | +#include <signal.h> | ||
78 | #include <stdlib.h> | ||
79 | #include <stdio.h> | ||
80 | #include <string.h> | ||
81 | diff --git a/src/racoon/backupsa.c b/src/racoon/backupsa.c | ||
82 | index 82d74ca..95307ca 100644 | ||
83 | --- a/src/racoon/backupsa.c | ||
84 | +++ b/src/racoon/backupsa.c | ||
85 | @@ -276,9 +276,9 @@ do { \ | ||
86 | GETNEXTNUM(sa_args.a_keylen, strtoul); | ||
87 | GETNEXTNUM(sa_args.flags, strtoul); | ||
88 | GETNEXTNUM(sa_args.l_alloc, strtoul); | ||
89 | - GETNEXTNUM(sa_args.l_bytes, strtouq); | ||
90 | - GETNEXTNUM(sa_args.l_addtime, strtouq); | ||
91 | - GETNEXTNUM(sa_args.l_usetime, strtouq); | ||
92 | + GETNEXTNUM(sa_args.l_bytes, strtoull); | ||
93 | + GETNEXTNUM(sa_args.l_addtime, strtoull); | ||
94 | + GETNEXTNUM(sa_args.l_usetime, strtoull); | ||
95 | GETNEXTNUM(sa_args.seq, strtoul); | ||
96 | |||
97 | #undef GETNEXTNUM | ||
98 | diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l | ||
99 | index 1701922..787f4a9 100644 | ||
100 | --- a/src/racoon/cftoken.l | ||
101 | +++ b/src/racoon/cftoken.l | ||
102 | @@ -77,6 +77,10 @@ | ||
103 | |||
104 | #include "cfparse.h" | ||
105 | |||
106 | +#ifndef GLOB_TILDE | ||
107 | +#define GLOB_TILDE 0 | ||
108 | +#endif | ||
109 | + | ||
110 | int yyerrorcount = 0; | ||
111 | |||
112 | #if defined(YIPS_DEBUG) | ||
113 | diff --git a/src/racoon/logger.h b/src/racoon/logger.h | ||
114 | index 3fd3e94..67af5f0 100644 | ||
115 | --- a/src/racoon/logger.h | ||
116 | +++ b/src/racoon/logger.h | ||
117 | @@ -34,6 +34,9 @@ | ||
118 | #ifndef _LOGGER_H | ||
119 | #define _LOGGER_H | ||
120 | |||
121 | +#undef __P | ||
122 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
123 | + | ||
124 | struct log { | ||
125 | int head; | ||
126 | int siz; | ||
127 | diff --git a/src/racoon/misc.h b/src/racoon/misc.h | ||
128 | index 3e758d9..30d9825 100644 | ||
129 | --- a/src/racoon/misc.h | ||
130 | +++ b/src/racoon/misc.h | ||
131 | @@ -34,6 +34,9 @@ | ||
132 | #ifndef _MISC_H | ||
133 | #define _MISC_H | ||
134 | |||
135 | +#undef __P | ||
136 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
137 | + | ||
138 | #define BIT2STR(b) bit2str(b, sizeof(b)<<3) | ||
139 | |||
140 | #ifdef HAVE_FUNC_MACRO | ||
141 | diff --git a/src/racoon/missing/crypto/sha2/sha2.h b/src/racoon/missing/crypto/sha2/sha2.h | ||
142 | index 42bcc2a..c043dfe 100644 | ||
143 | --- a/src/racoon/missing/crypto/sha2/sha2.h | ||
144 | +++ b/src/racoon/missing/crypto/sha2/sha2.h | ||
145 | @@ -40,6 +40,9 @@ | ||
146 | #ifndef __SHA2_H__ | ||
147 | #define __SHA2_H__ | ||
148 | |||
149 | +#undef __P | ||
150 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
151 | + | ||
152 | #ifdef __cplusplus | ||
153 | extern "C" { | ||
154 | #endif | ||
155 | diff --git a/src/racoon/netdb_dnssec.h b/src/racoon/netdb_dnssec.h | ||
156 | index a11209d..98fd813 100644 | ||
157 | --- a/src/racoon/netdb_dnssec.h | ||
158 | +++ b/src/racoon/netdb_dnssec.h | ||
159 | @@ -34,6 +34,9 @@ | ||
160 | #ifndef _NETDB_DNSSEC_H | ||
161 | #define _NETDB_DNSSEC_H | ||
162 | |||
163 | +#undef __P | ||
164 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
165 | + | ||
166 | #ifndef T_CERT | ||
167 | #define T_CERT 37 /* defined by RFC2538 section 2 */ | ||
168 | #endif | ||
169 | diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c | ||
170 | index 8f26c19..a06c30e 100644 | ||
171 | --- a/src/racoon/pfkey.c | ||
172 | +++ b/src/racoon/pfkey.c | ||
173 | @@ -59,7 +59,6 @@ | ||
174 | #include <sys/param.h> | ||
175 | #include <sys/socket.h> | ||
176 | #include <sys/queue.h> | ||
177 | -#include <sys/sysctl.h> | ||
178 | |||
179 | #include <net/route.h> | ||
180 | #include <net/pfkeyv2.h> | ||
181 | diff --git a/src/racoon/plog.h b/src/racoon/plog.h | ||
182 | index ed43c8b..920c850 100644 | ||
183 | --- a/src/racoon/plog.h | ||
184 | +++ b/src/racoon/plog.h | ||
185 | @@ -34,6 +34,8 @@ | ||
186 | #ifndef _PLOG_H | ||
187 | #define _PLOG_H | ||
188 | |||
189 | +#undef __P | ||
190 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
191 | #ifdef HAVE_STDARG_H | ||
192 | #include <stdarg.h> | ||
193 | #else | ||
194 | diff --git a/src/racoon/str2val.h b/src/racoon/str2val.h | ||
195 | index 4a7cec1..d3d698e 100644 | ||
196 | --- a/src/racoon/str2val.h | ||
197 | +++ b/src/racoon/str2val.h | ||
198 | @@ -34,6 +34,9 @@ | ||
199 | #ifndef _STR2VAL_H | ||
200 | #define _STR2VAL_H | ||
201 | |||
202 | +#undef __P | ||
203 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
204 | + | ||
205 | extern caddr_t val2str __P((const char *, size_t)); | ||
206 | extern char *str2val __P((const char *, int, size_t *)); | ||
207 | |||
208 | diff --git a/src/racoon/vmbuf.h b/src/racoon/vmbuf.h | ||
209 | index 3f2f4ea..8287a00 100644 | ||
210 | --- a/src/racoon/vmbuf.h | ||
211 | +++ b/src/racoon/vmbuf.h | ||
212 | @@ -34,6 +34,9 @@ | ||
213 | #ifndef _VMBUF_H | ||
214 | #define _VMBUF_H | ||
215 | |||
216 | +#undef __P | ||
217 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
218 | + | ||
219 | /* | ||
220 | * bp v | ||
221 | * v v | ||
222 | diff --git a/src/setkey/extern.h b/src/setkey/extern.h | ||
223 | index 6f439fa..a1d9d14 100644 | ||
224 | --- a/src/setkey/extern.h | ||
225 | +++ b/src/setkey/extern.h | ||
226 | @@ -1,6 +1,7 @@ | ||
227 | /* $NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $ */ | ||
228 | |||
229 | - | ||
230 | +#undef __P | ||
231 | +#define __P(protos) protos /* ANSI C prototypes */ | ||
232 | |||
233 | void parse_init __P((void)); | ||
234 | int parse __P((FILE **)); | ||
235 | diff --git a/src/setkey/setkey.c b/src/setkey/setkey.c | ||
236 | index c400faa..51f8b75 100644 | ||
237 | --- a/src/setkey/setkey.c | ||
238 | +++ b/src/setkey/setkey.c | ||
239 | @@ -40,7 +40,6 @@ | ||
240 | #include <sys/socket.h> | ||
241 | #include <sys/time.h> | ||
242 | #include <sys/stat.h> | ||
243 | -#include <sys/sysctl.h> | ||
244 | #include <err.h> | ||
245 | #include <netinet/in.h> | ||
246 | #include <net/pfkeyv2.h> | ||
247 | -- | ||
248 | 2.12.0 | ||
249 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb index bf8992752..8f98b6c5c 100644 --- a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb | |||
@@ -22,7 +22,8 @@ SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${P | |||
22 | file://racoon.service \ | 22 | file://racoon.service \ |
23 | file://fix-CVE-2015-4047.patch \ | 23 | file://fix-CVE-2015-4047.patch \ |
24 | file://0001-Fix-build-with-clang.patch \ | 24 | file://0001-Fix-build-with-clang.patch \ |
25 | " | 25 | file://0001-Fix-header-issues-found-with-musl-libc.patch \ |
26 | " | ||
26 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" | 27 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" |
27 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" | 28 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" |
28 | 29 | ||