aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Roubert <joakimr@axis.com>2019-09-18 08:37:04 +0200
committerPeter Kjellerstedt <pkj@axis.com>2019-09-18 17:34:34 +0200
commit6e3fb2c1b28eabc45faf104dfcfca1800d081e24 (patch)
treedcacd16bc9b667e650b0e23d6beab1783f96027f
parent1e2480e50f34e55bdfd5e06f98441e03a3752d5a (diff)
downloadmeta-gplv2-6e3fb2c1b28eabc45faf104dfcfca1800d081e24.tar.gz
meta-gplv2-6e3fb2c1b28eabc45faf104dfcfca1800d081e24.tar.bz2
meta-gplv2-6e3fb2c1b28eabc45faf104dfcfca1800d081e24.zip
tar: Make it build with GCC 8.3
This avoids the following error: lib/argp-parse.c: In function 'argp_version_parser': lib/argp-parse.c:158:2: error: format not a string literal and no format arguments [-Werror=format-security] __argp_error (state, dgettext (state->root_argp->argp_domain, ^~~~~~~~~~~~ Signed-off-by: Joakim Roubert <joakim.roubert@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-rw-r--r--recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch34
-rw-r--r--recipes-extended/tar/tar_1.17.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch b/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch
new file mode 100644
index 0000000..3de9fd1
--- /dev/null
+++ b/recipes-extended/tar/tar/0001-lib-argp-parse.c-Fix-compiler-error.patch
@@ -0,0 +1,34 @@
+From 153c0aab9e2a4a97b1a2c6b530594cd9a211e9ec Mon Sep 17 00:00:00 2001
+From: Joakim Roubert <joakimr@axis.com>
+Date: Thu, 6 Dec 2018 10:33:14 +0100
+Subject: [PATCH] lib/argp-parse.c: Fix compiler error
+
+This avoids the following error:
+
+ lib/argp-parse.c: In function 'argp_version_parser':
+ lib/argp-parse.c:158:2: error: format not a string literal and no
+ format arguments [-Werror=format-security]
+ __argp_error (state, dgettext (state->root_argp->argp_domain,
+ ^~~~~~~~~~~~
+
+Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
+---
+ lib/argp-parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/argp-parse.c b/lib/argp-parse.c
+index a7de729..09511ba 100644
+--- a/lib/argp-parse.c
++++ b/lib/argp-parse.c
+@@ -155,7 +155,7 @@ argp_version_parser (int key, char *arg, struct argp_state *state)
+ else if (argp_program_version)
+ fprintf (state->out_stream, "%s\n", argp_program_version);
+ else
+- __argp_error (state, dgettext (state->root_argp->argp_domain,
++ __argp_error (state, "%s", dgettext (state->root_argp->argp_domain,
+ "(PROGRAM ERROR) No version known!?"));
+ if (! (state->flags & ARGP_NO_EXIT))
+ exit (0);
+--
+2.11.0
+
diff --git a/recipes-extended/tar/tar_1.17.bb b/recipes-extended/tar/tar_1.17.bb
index b9ca206..1ee5e34 100644
--- a/recipes-extended/tar/tar_1.17.bb
+++ b/recipes-extended/tar/tar_1.17.bb
@@ -8,6 +8,7 @@ PR = "r3"
SRC_URI += "file://m4extensions.patch \
file://gcc43build.patch \
file://avoid_heap_overflow.patch \
+ file://0001-lib-argp-parse.c-Fix-compiler-error.patch \
"
SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"