diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-11-15 04:21:19 +0000 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-02-24 19:33:29 +0000 |
commit | fae7d92ab987aa557709acc38dda82469ab5dfbc (patch) | |
tree | 13c169cefab05532ce1d72a9ddb40a8738866265 /meta-networking | |
parent | 341b1e7b16e94773fd9b7b694883f9dae84cb23d (diff) | |
download | meta-openembedded-fae7d92ab987aa557709acc38dda82469ab5dfbc.tar.gz |
ipsec-tools: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
(cherry picked from commit f99ac6369e05c8fe13f2bed28b3e5fbfa1f8e96e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch | 115 | ||||
-rw-r--r-- | meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb | 1 |
2 files changed, 116 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch new file mode 100644 index 000000000..5c0914745 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Fix-build-with-clang.patch | |||
@@ -0,0 +1,115 @@ | |||
1 | From 9135ca401186fb14e5e5110bbb04d1ccc480360a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 15 Nov 2016 04:15:44 +0000 | ||
4 | Subject: [PATCH] Fix build with clang | ||
5 | |||
6 | Fixes for following errors found by clang | ||
7 | |||
8 | src/racoon/eaytest.c:316:6: error: comparison of array 'dnstr_w1' not equal to a null pointer is always true | ||
9 | [-Werror,-Wtautological-pointer-compare] | ||
10 | if (dnstr_w1 != NULL) { | ||
11 | ^~~~~~~~ ~~~~ | ||
12 | src/racoon/eaytest.c:326:6: error: comparison of array 'dnstr_w1' not equal to a null pointer is always true | ||
13 | [-Werror,-Wtautological-pointer-compare] | ||
14 | if (dnstr_w1 != NULL) { | ||
15 | ^~~~~~~~ ~~~~ | ||
16 | |||
17 | src/racoon/isakmp.c:1134:11: error: promoted type 'int' of K&R function parameter is not compatible with the | ||
18 | parameter type 'u_int8_t' (aka 'unsigned char') declared in a previous prototype [-Werror,-Wknr-promoted-parameter] | ||
19 | u_int8_t etype; | ||
20 | ^ | ||
21 | src/racoon/isakmp.c:184:48: note: previous declaration is here | ||
22 | struct sockaddr *, struct sockaddr *, u_int8_t)); | ||
23 | ^ | ||
24 | 1 error generated. | ||
25 | |||
26 | src/racoon/racoonctl.c:1457:15: error: incompatible pointer types passing 'struct evt_async *' to parameter of type | ||
27 | 'caddr_t' (aka 'char *') [-Werror,-Wincompatible-pointer-types] | ||
28 | print_cfg(ec, len); | ||
29 | ^~ | ||
30 | |||
31 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
32 | --- | ||
33 | src/racoon/eaytest.c | 4 ++-- | ||
34 | src/racoon/isakmp.c | 10 +++++----- | ||
35 | src/racoon/racoonctl.c | 7 +++---- | ||
36 | 3 files changed, 10 insertions(+), 11 deletions(-) | ||
37 | |||
38 | diff --git a/src/racoon/eaytest.c b/src/racoon/eaytest.c | ||
39 | index 1474bdc..d609e4f 100644 | ||
40 | --- a/src/racoon/eaytest.c | ||
41 | +++ b/src/racoon/eaytest.c | ||
42 | @@ -313,7 +313,7 @@ certtest(ac, av) | ||
43 | |||
44 | printf("exact match: succeed.\n"); | ||
45 | |||
46 | - if (dnstr_w1 != NULL) { | ||
47 | + if (dnstr_w1[0] != '\0') { | ||
48 | asn1dn = eay_str2asn1dn(dnstr_w1, strlen(dnstr_w1)); | ||
49 | if (asn1dn == NULL || asn1dn->l == asn1dn0.l) | ||
50 | errx(1, "asn1dn length wrong for wildcard 1\n"); | ||
51 | @@ -323,7 +323,7 @@ certtest(ac, av) | ||
52 | printf("wildcard 1 match: succeed.\n"); | ||
53 | } | ||
54 | |||
55 | - if (dnstr_w1 != NULL) { | ||
56 | + if (dnstr_w1[0] != '\0') { | ||
57 | asn1dn = eay_str2asn1dn(dnstr_w2, strlen(dnstr_w2)); | ||
58 | if (asn1dn == NULL || asn1dn->l == asn1dn0.l) | ||
59 | errx(1, "asn1dn length wrong for wildcard 2\n"); | ||
60 | diff --git a/src/racoon/isakmp.c b/src/racoon/isakmp.c | ||
61 | index 2672f7a..da7ebe8 100644 | ||
62 | --- a/src/racoon/isakmp.c | ||
63 | +++ b/src/racoon/isakmp.c | ||
64 | @@ -567,7 +567,7 @@ isakmp_main(msg, remote, local) | ||
65 | |||
66 | /* it must be responder's 1st exchange. */ | ||
67 | if (isakmp_ph1begin_r(msg, remote, local, | ||
68 | - isakmp->etype) < 0) | ||
69 | + (u_int8_t)isakmp->etype) < 0) | ||
70 | return -1; | ||
71 | break; | ||
72 | |||
73 | @@ -1128,10 +1128,10 @@ isakmp_ph1begin_i(rmconf, remote, local) | ||
74 | |||
75 | /* new negotiation of phase 1 for responder */ | ||
76 | static int | ||
77 | -isakmp_ph1begin_r(msg, remote, local, etype) | ||
78 | - vchar_t *msg; | ||
79 | - struct sockaddr *remote, *local; | ||
80 | - u_int8_t etype; | ||
81 | +isakmp_ph1begin_r(vchar_t *msg, | ||
82 | + struct sockaddr *remote, | ||
83 | + struct sockaddr *local, | ||
84 | + u_int8_t etype) | ||
85 | { | ||
86 | struct isakmp *isakmp = (struct isakmp *)msg->v; | ||
87 | struct ph1handle *iph1; | ||
88 | diff --git a/src/racoon/racoonctl.c b/src/racoon/racoonctl.c | ||
89 | index da28ecd..bbf068e 100644 | ||
90 | --- a/src/racoon/racoonctl.c | ||
91 | +++ b/src/racoon/racoonctl.c | ||
92 | @@ -1299,9 +1299,8 @@ print_evt(evtdump) | ||
93 | * Print ISAKMP mode config info (IP and banner) | ||
94 | */ | ||
95 | void | ||
96 | -print_cfg(buf, len) | ||
97 | - caddr_t buf; | ||
98 | - int len; | ||
99 | +print_cfg(caddr_t buf, | ||
100 | + int len) | ||
101 | { | ||
102 | struct evt_async *evtdump = (struct evt_async *)buf; | ||
103 | struct isakmp_data *attr; | ||
104 | @@ -1454,7 +1453,7 @@ handle_recv(combuf) | ||
105 | else if (evt_quit_event == ec->ec_type) { | ||
106 | switch (ec->ec_type) { | ||
107 | case EVT_PHASE1_MODE_CFG: | ||
108 | - print_cfg(ec, len); | ||
109 | + print_cfg((caddr_t)ec, len); | ||
110 | break; | ||
111 | default: | ||
112 | print_evt(ec); | ||
113 | -- | ||
114 | 1.9.1 | ||
115 | |||
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 218e3bbe6..bf8992752 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 | |||
@@ -21,6 +21,7 @@ SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${P | |||
21 | file://racoon.conf \ | 21 | file://racoon.conf \ |
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 | " | 25 | " |
25 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" | 26 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" |
26 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" | 27 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" |