Signed-off-by: Khem Raj <[email protected]>
---
 ...hook-Do-not-append-int-to-std-string.patch | 34 +++++++++++++++++++
 meta-oe/recipes-devtools/ltrace/ltrace_git.bb |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 
meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch

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 0000000000..69e078741d
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch
@@ -0,0 +1,34 @@
+From 8321f8b3befbaa355cfed988fdd8494133989676 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 4 Feb 2019 00:38:16 -0800
+Subject: [PATCH] hook: Do not append int to std::string
+
+Clang find this error
+
+| ../../../git/sysdeps/linux-gnu/hooks.c:205:51: error: adding 'int' to a 
string does not append to the string [-Werror,-Wstring-plus
+-int]
+|                     || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0)
+|                                                              ~~~^~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ sysdeps/linux-gnu/hooks.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/linux-gnu/hooks.c b/sysdeps/linux-gnu/hooks.c
+index 327fdf3..4750d85 100644
+--- a/sysdeps/linux-gnu/hooks.c
++++ b/sysdeps/linux-gnu/hooks.c
+@@ -202,7 +202,7 @@ os_get_ltrace_conf_filenames(struct vect *retp)
+               /* No +1, we skip the initial period.  */
+               syspath = malloc(strlen(sysconfdir) + sizeof FN);
+               if (syspath == NULL
+-                  || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0)
++                  || sprintf(syspath, "%s/%s", sysconfdir, FN) < 0)
+                       goto fail;
+       }
+ 
+-- 
+2.20.1
+
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb 
b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 83043cd212..3dc269c80e 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
            file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \
            file://0001-mips-plt.c-Delete-include-error.h.patch \
            
file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
+           file://0001-hook-Do-not-append-int-to-std-string.patch \
            "
 S = "${WORKDIR}/git"
 
-- 
2.20.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to