summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-04 00:43:10 -0800
committerKhem Raj <raj.khem@gmail.com>2019-02-05 16:43:12 -0800
commit1a502b3086d0490afb527fb919f1d5e051dd8e43 (patch)
tree8f3970ea0104be1d64d5bdf37389ae6806587863 /meta-oe/recipes-devtools
parentcde3ede254ef5c15b4940c6b425e2f5ab25c853b (diff)
downloadmeta-openembedded-1a502b3086d0490afb527fb919f1d5e051dd8e43.tar.gz
ltrace: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch33
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_git.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch
new file mode 100644
index 000000000..8f1c4b9b9
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch
@@ -0,0 +1,33 @@
1From 8321f8b3befbaa355cfed988fdd8494133989676 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 4 Feb 2019 00:38:16 -0800
4Subject: [PATCH] hook: Do not append int to std::string
5
6Clang find this error
7
8| ../../../git/sysdeps/linux-gnu/hooks.c:205:51: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus
9-int]
10| || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0)
11| ~~~^~~
12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 sysdeps/linux-gnu/hooks.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19--- a/sysdeps/linux-gnu/hooks.c
20+++ b/sysdeps/linux-gnu/hooks.c
21@@ -200,9 +200,10 @@ os_get_ltrace_conf_filenames(struct vect
22 const char *sysconfdir = SYSCONFDIR;
23 if (sysconfdir != NULL && *sysconfdir != '\0') {
24 /* No +1, we skip the initial period. */
25- syspath = malloc(strlen(sysconfdir) + sizeof FN);
26+ syspath = malloc(strlen(sysconfdir) + sizeof FN + 1);
27+ syspath[strlen(sysconfdir) + sizeof FN + 1] = '\0';
28 if (syspath == NULL
29- || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0)
30+ || sprintf(syspath, "%s/%s", sysconfdir, FN) < 0)
31 goto fail;
32 }
33
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 83043cd21..3dc269c80 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http
26 file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ 26 file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \
27 file://0001-mips-plt.c-Delete-include-error.h.patch \ 27 file://0001-mips-plt.c-Delete-include-error.h.patch \
28 file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ 28 file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
29 file://0001-hook-Do-not-append-int-to-std-string.patch \
29 " 30 "
30S = "${WORKDIR}/git" 31S = "${WORKDIR}/git"
31 32