mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
ipsec-tools: Disable gcc8 warnings
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
+86
@@ -0,0 +1,86 @@
|
|||||||
|
From 282d492e4cab7b4d9c7321f4c0c55b615948e280 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Fri, 11 May 2018 14:09:17 -0700
|
||||||
|
Subject: [PATCH] Disable gcc8 specific warnings
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
src/libipsec/ipsec_dump_policy.c | 5 +++++
|
||||||
|
src/libipsec/pfkey_dump.c | 5 +++++
|
||||||
|
src/racoon/isakmp.c | 11 ++++++++++-
|
||||||
|
3 files changed, 20 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/libipsec/ipsec_dump_policy.c b/src/libipsec/ipsec_dump_policy.c
|
||||||
|
index 4d0eb77..c3fc842 100644
|
||||||
|
--- a/src/libipsec/ipsec_dump_policy.c
|
||||||
|
+++ b/src/libipsec/ipsec_dump_policy.c
|
||||||
|
@@ -275,6 +275,10 @@ ipsec_dump_policy1(policy, delimiter, withports)
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#if defined(__GNUC__) && (__GNUC__ >= 8)
|
||||||
|
+#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||||
|
+#endif
|
||||||
|
static char *
|
||||||
|
ipsec_dump_ipsecrequest(buf, len, xisr, bound, withports)
|
||||||
|
char *buf;
|
||||||
|
@@ -419,3 +423,4 @@ set_address(buf, len, sa, withports)
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
diff --git a/src/libipsec/pfkey_dump.c b/src/libipsec/pfkey_dump.c
|
||||||
|
index 4627ebc..451e535 100644
|
||||||
|
--- a/src/libipsec/pfkey_dump.c
|
||||||
|
+++ b/src/libipsec/pfkey_dump.c
|
||||||
|
@@ -691,6 +691,10 @@ str_ipport(sa)
|
||||||
|
/*
|
||||||
|
* set "/prefix[port number]" to buffer.
|
||||||
|
*/
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#if defined(__GNUC__) && (__GNUC__ >= 8)
|
||||||
|
+#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||||
|
+#endif
|
||||||
|
static char *
|
||||||
|
str_prefport(family, pref, port, ulp)
|
||||||
|
u_int family, pref, port, ulp;
|
||||||
|
@@ -735,6 +739,7 @@ str_prefport(family, pref, port, ulp)
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
static void
|
||||||
|
str_upperspec(ulp, p1, p2)
|
||||||
|
diff --git a/src/racoon/isakmp.c b/src/racoon/isakmp.c
|
||||||
|
index 7ff53a3..4addf24 100644
|
||||||
|
--- a/src/racoon/isakmp.c
|
||||||
|
+++ b/src/racoon/isakmp.c
|
||||||
|
@@ -3124,7 +3124,12 @@ script_hook(iph1, script)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* local address */
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#if defined(__GNUC__) && (__GNUC__ >= 8)
|
||||||
|
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||||
|
+#endif
|
||||||
|
GETNAMEINFO(iph1->local, addrstr, portstr);
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
if (script_env_append(&envp, &envc, "LOCAL_ADDR", addrstr) != 0) {
|
||||||
|
plog(LLV_ERROR, LOCATION, NULL, "Cannot set LOCAL_ADDR\n");
|
||||||
|
@@ -3138,8 +3143,12 @@ script_hook(iph1, script)
|
||||||
|
|
||||||
|
/* Peer address */
|
||||||
|
if (iph1->remote != NULL) {
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#if defined(__GNUC__) && (__GNUC__ >= 8)
|
||||||
|
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||||
|
+#endif
|
||||||
|
GETNAMEINFO(iph1->remote, addrstr, portstr);
|
||||||
|
-
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
if (script_env_append(&envp, &envc,
|
||||||
|
"REMOTE_ADDR", addrstr) != 0) {
|
||||||
|
plog(LLV_ERROR, LOCATION, NULL,
|
||||||
@@ -25,6 +25,7 @@ SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${P
|
|||||||
file://0001-Fix-header-issues-found-with-musl-libc.patch \
|
file://0001-Fix-header-issues-found-with-musl-libc.patch \
|
||||||
file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
|
file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
|
||||||
file://fix-CVE-2016-10396.patch \
|
file://fix-CVE-2016-10396.patch \
|
||||||
|
file://0001-Disable-gcc8-specific-warnings.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
|
SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
|
||||||
SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
|
SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
|
||||||
|
|||||||
Reference in New Issue
Block a user