summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-header-issues-found-with-musl-libc.patch
blob: 630ecdb5f41fac7e50ab187dbec4070d33e3c445 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
From 7d9585be093c9cb2428b373c0b0088bb778942d0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 20 Mar 2017 21:37:47 -0700
Subject: [PATCH] Fix header issues found with musl libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/libipsec/ipsec_strerror.h         | 3 +++
 src/libipsec/libpfkey.h               | 4 +++-
 src/racoon/admin.c                    | 2 +-
 src/racoon/backupsa.c                 | 6 +++---
 src/racoon/cftoken.l                  | 4 ++++
 src/racoon/logger.h                   | 3 +++
 src/racoon/misc.h                     | 3 +++
 src/racoon/missing/crypto/sha2/sha2.h | 3 +++
 src/racoon/netdb_dnssec.h             | 3 +++
 src/racoon/pfkey.c                    | 1 -
 src/racoon/plog.h                     | 2 ++
 src/racoon/str2val.h                  | 3 +++
 src/racoon/vmbuf.h                    | 3 +++
 src/setkey/extern.h                   | 3 ++-
 src/setkey/setkey.c                   | 1 -
 15 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/src/libipsec/ipsec_strerror.h b/src/libipsec/ipsec_strerror.h
index 2b4264f..dac66a1 100644
--- a/src/libipsec/ipsec_strerror.h
+++ b/src/libipsec/ipsec_strerror.h
@@ -34,6 +34,9 @@
 #ifndef _IPSEC_STRERROR_H
 #define _IPSEC_STRERROR_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 extern int __ipsec_errcode;
 extern void __ipsec_set_strerror __P((const char *));
 
diff --git a/src/libipsec/libpfkey.h b/src/libipsec/libpfkey.h
index 61d2f2a..f7991b7 100644
--- a/src/libipsec/libpfkey.h
+++ b/src/libipsec/libpfkey.h
@@ -34,6 +34,9 @@
 #ifndef _LIBPFKEY_H
 #define _LIBPFKEY_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 #ifndef KAME_LIBPFKEY_H
 #define KAME_LIBPFKEY_H
 
@@ -43,7 +46,6 @@
 
 #define PRIORITY_OFFSET_POSITIVE_MAX	0x3fffffff
 #define PRIORITY_OFFSET_NEGATIVE_MAX	0x40000000
-
 struct sadb_msg;
 extern void pfkey_sadump __P((struct sadb_msg *));
 extern void pfkey_sadump_withports __P((struct sadb_msg *));
diff --git a/src/racoon/admin.c b/src/racoon/admin.c
index 4b1875b..03ea3f8 100644
--- a/src/racoon/admin.c
+++ b/src/racoon/admin.c
@@ -36,7 +36,6 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
-#include <sys/signal.h>
 #include <sys/stat.h>
 #include <sys/un.h>
 
@@ -46,6 +45,7 @@
 #include PATH_IPSEC_H
 
 
+#include <signal.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/racoon/backupsa.c b/src/racoon/backupsa.c
index 82d74ca..95307ca 100644
--- a/src/racoon/backupsa.c
+++ b/src/racoon/backupsa.c
@@ -276,9 +276,9 @@ do { 								\
 		GETNEXTNUM(sa_args.a_keylen, strtoul);
 		GETNEXTNUM(sa_args.flags, strtoul);
 		GETNEXTNUM(sa_args.l_alloc, strtoul);
-		GETNEXTNUM(sa_args.l_bytes, strtouq);
-		GETNEXTNUM(sa_args.l_addtime, strtouq);
-		GETNEXTNUM(sa_args.l_usetime, strtouq);
+		GETNEXTNUM(sa_args.l_bytes, strtoull);
+		GETNEXTNUM(sa_args.l_addtime, strtoull);
+		GETNEXTNUM(sa_args.l_usetime, strtoull);
 		GETNEXTNUM(sa_args.seq, strtoul);
 
 #undef GETNEXTNUM
diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l
index 1701922..787f4a9 100644
--- a/src/racoon/cftoken.l
+++ b/src/racoon/cftoken.l
@@ -77,6 +77,10 @@
 
 #include "cfparse.h"
 
+#ifndef GLOB_TILDE
+#define GLOB_TILDE 0
+#endif
+
 int yyerrorcount = 0;
 
 #if defined(YIPS_DEBUG)
diff --git a/src/racoon/logger.h b/src/racoon/logger.h
index 3fd3e94..67af5f0 100644
--- a/src/racoon/logger.h
+++ b/src/racoon/logger.h
@@ -34,6 +34,9 @@
 #ifndef _LOGGER_H
 #define _LOGGER_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 struct log {
 	int head;
 	int siz;
diff --git a/src/racoon/misc.h b/src/racoon/misc.h
index 3e758d9..30d9825 100644
--- a/src/racoon/misc.h
+++ b/src/racoon/misc.h
@@ -34,6 +34,9 @@
 #ifndef _MISC_H
 #define _MISC_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 #define BIT2STR(b) bit2str(b, sizeof(b)<<3)
 
 #ifdef HAVE_FUNC_MACRO
diff --git a/src/racoon/missing/crypto/sha2/sha2.h b/src/racoon/missing/crypto/sha2/sha2.h
index 42bcc2a..c043dfe 100644
--- a/src/racoon/missing/crypto/sha2/sha2.h
+++ b/src/racoon/missing/crypto/sha2/sha2.h
@@ -40,6 +40,9 @@
 #ifndef __SHA2_H__
 #define __SHA2_H__
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/src/racoon/netdb_dnssec.h b/src/racoon/netdb_dnssec.h
index a11209d..98fd813 100644
--- a/src/racoon/netdb_dnssec.h
+++ b/src/racoon/netdb_dnssec.h
@@ -34,6 +34,9 @@
 #ifndef _NETDB_DNSSEC_H
 #define _NETDB_DNSSEC_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 #ifndef T_CERT
 #define T_CERT	37		/* defined by RFC2538 section 2 */
 #endif
diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
index 8f26c19..a06c30e 100644
--- a/src/racoon/pfkey.c
+++ b/src/racoon/pfkey.c
@@ -59,7 +59,6 @@
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/queue.h>
-#include <sys/sysctl.h>
 
 #include <net/route.h>
 #include <net/pfkeyv2.h>
diff --git a/src/racoon/plog.h b/src/racoon/plog.h
index ed43c8b..920c850 100644
--- a/src/racoon/plog.h
+++ b/src/racoon/plog.h
@@ -34,6 +34,8 @@
 #ifndef _PLOG_H
 #define _PLOG_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
 #ifdef HAVE_STDARG_H
 #include <stdarg.h>
 #else
diff --git a/src/racoon/str2val.h b/src/racoon/str2val.h
index 4a7cec1..d3d698e 100644
--- a/src/racoon/str2val.h
+++ b/src/racoon/str2val.h
@@ -34,6 +34,9 @@
 #ifndef _STR2VAL_H
 #define _STR2VAL_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 extern caddr_t val2str __P((const char *, size_t));
 extern char *str2val __P((const char *, int, size_t *));
 
diff --git a/src/racoon/vmbuf.h b/src/racoon/vmbuf.h
index 3f2f4ea..8287a00 100644
--- a/src/racoon/vmbuf.h
+++ b/src/racoon/vmbuf.h
@@ -34,6 +34,9 @@
 #ifndef _VMBUF_H
 #define _VMBUF_H
 
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
+
 /*
  *	bp      v
  *	v       v
diff --git a/src/setkey/extern.h b/src/setkey/extern.h
index 6f439fa..a1d9d14 100644
--- a/src/setkey/extern.h
+++ b/src/setkey/extern.h
@@ -1,6 +1,7 @@
 /*	$NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $	*/
 
-
+#undef __P
+#define __P(protos)     protos          /* ANSI C prototypes */
 
 void parse_init __P((void));
 int parse __P((FILE **));
diff --git a/src/setkey/setkey.c b/src/setkey/setkey.c
index c400faa..51f8b75 100644
--- a/src/setkey/setkey.c
+++ b/src/setkey/setkey.c
@@ -40,7 +40,6 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/stat.h>
-#include <sys/sysctl.h>
 #include <err.h>
 #include <netinet/in.h>
 #include <net/pfkeyv2.h>
-- 
2.12.0

OpenPOWER on IntegriCloud