diff options
Diffstat (limited to 'meta-networking/recipes-support/strongswan/files/0001-enum-Fix-compiler-warning.patch')
-rw-r--r-- | meta-networking/recipes-support/strongswan/files/0001-enum-Fix-compiler-warning.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/strongswan/files/0001-enum-Fix-compiler-warning.patch b/meta-networking/recipes-support/strongswan/files/0001-enum-Fix-compiler-warning.patch new file mode 100644 index 0000000000..e730fe1cd0 --- /dev/null +++ b/meta-networking/recipes-support/strongswan/files/0001-enum-Fix-compiler-warning.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From d23c0ea81e630af3cfda89aeeb52146c0c84c960 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tobias Brunner <tobias@strongswan.org> | ||
3 | Date: Mon, 2 May 2022 09:31:49 +0200 | ||
4 | Subject: [PATCH] enum: Fix compiler warning | ||
5 | |||
6 | Closes strongswan/strongswan#1025 | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | [https://github.com/strongswan/strongswan/commit/d23c0ea81e630af3cfda89aeeb52146c0c84c960] | ||
10 | |||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | ||
13 | src/libstrongswan/utils/enum.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/libstrongswan/utils/enum.c b/src/libstrongswan/utils/enum.c | ||
17 | index 79da450f0c..1e77489f6f 100644 | ||
18 | --- a/src/libstrongswan/utils/enum.c | ||
19 | +++ b/src/libstrongswan/utils/enum.c | ||
20 | @@ -97,7 +97,7 @@ char *enum_flags_to_string(enum_name_t *e, u_int val, char *buf, size_t len) | ||
21 | return buf; | ||
22 | } | ||
23 | |||
24 | - if (snprintf(buf, len, e->names[0]) >= len) | ||
25 | + if (snprintf(buf, len, "%s", e->names[0]) >= len) | ||
26 | { | ||
27 | return NULL; | ||
28 | } | ||
29 | -- | ||
30 | 2.25.1 | ||
31 | |||