diff mbox series

[oe,meta-networking,6/6] lowpan-tools: Switch to using github src_uri and fix build with gcc8

Message ID 20180402180546.38078-6-raj.khem@gmail.com
State Accepted
Commit 20a34351159d9cdf45f98b10034671a12e4af462
Headers show
Series [oe,meta-networking,1/6] wpan-tools: Add recipe | expand

Commit Message

Khem Raj April 2, 2018, 6:05 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...001-coordinator-Fix-strncpy-range-warning.patch | 30 ++++++++++++++++++++++
 .../lowpan-tools/lowpan-tools_git.bb               |  5 ++--
 2 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch

-- 
2.16.3

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
new file mode 100644
index 000000000..493832bb8
--- /dev/null
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
@@ -0,0 +1,30 @@ 
+From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 1 Apr 2018 14:31:05 -0700
+Subject: [PATCH] coordinator: Fix strncpy range warning
+
+Fixes
+error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/coordinator.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/coordinator.c b/src/coordinator.c
+index c139aae..ca49418 100644
+--- a/src/coordinator.c
++++ b/src/coordinator.c
+@@ -296,7 +296,8 @@ int main(int argc, char **argv)
+ 	if(!lease_file)
+ 		lease_file = LEASE_FILE;
+ 
+-	strncpy(pname, argv[0], PATH_MAX);
++	strncpy(pname, argv[0], PATH_MAX - 1);
++	pname[PATH_MAX - 1] = '\0';
+ 
+ 	pid_file = getenv("PID_FILE");
+ 	if (!pid_file)
+-- 
+2.16.3
+
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
index be73f8ae4..d0fe59c98 100644
--- a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -8,14 +8,15 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 DEPENDS = "flex-native bison-native libnl python"
 
 PV = "0.3.1+git${SRCPV}"
-SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \
+SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
            file://no-help2man.patch \
            file://0001-Fix-build-errors-with-clang.patch \
            file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
            file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
            file://0001-Remove-newline-from-format-line.patch \
+           file://0001-coordinator-Fix-strncpy-range-warning.patch \
            "
-SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"
+SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
 
 S = "${WORKDIR}/git"