[oe,meta-networking,11/16] openl2tp: Fix build with clang

Message ID 20161019053834.11523-11-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Oct. 19, 2016, 5:38 a.m.
Fix a typo in compile cmdline specified via
EXTRA_OECMAKE

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-test-pppd_dummy.c-Fix-return-value.patch  | 38 ++++++++++++++++++++++
 .../recipes-protocols/openl2tp/openl2tp_1.8.bb     |  5 +--
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch

-- 
2.10.0

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

Patch hide | download patch | download mbox

diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch
new file mode 100644
index 0000000..1f576fa
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-test-pppd_dummy.c-Fix-return-value.patch
@@ -0,0 +1,38 @@ 
+From ce5f5563ab54db9d28dba44a0e25e8a8c7bb9876 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 Oct 2016 00:34:35 +0000
+Subject: [PATCH] test/pppd_dummy.c: Fix return value
+
+pause() is defined in unistd.h, clang does not
+like the fact that we are using a function without
+declaration
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/pppd_dummy.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/pppd_dummy.c b/test/pppd_dummy.c
+index 148e7d2..b564c36 100644
+--- a/test/pppd_dummy.c
++++ b/test/pppd_dummy.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <syslog.h>
++#include <unistd.h>
+ 
+ #define PPPD_DUMMY_TMP_FILE	"/tmp/pppd_dummy"
+ 
+@@ -40,7 +41,7 @@ int main(int argc, char **argv)
+ 	
+ 	if (file == NULL) {
+ 		syslog(LOG_ERR, "Failed to open %s\n", filename);
+-		return;
++		return -1;
+ 	}
+ 
+ 	for (arg = 1; arg < argc; arg++) {
+-- 
+1.9.1
+
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
index 270472e..5a63404 100644
--- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb
@@ -15,14 +15,15 @@  SRC_URI = "http://ftp.jaist.ac.jp/pub/sourceforge/o/op/${PN}/${PN}/${PV}/${BP}.t
            file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \
            file://openl2tp-simplify-gcc-warning-hack.patch \
            file://Makefile-obey-LDFLAGS.patch \
-          "
+           file://0001-test-pppd_dummy.c-Fix-return-value.patch \
+           "
 SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
 SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
 
 inherit autotools-brokensep pkgconfig
 
 PARALLEL_MAKE = ""
-EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-nused-but-set-variable"'
+EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-unused-but-set-variable"'
 
 do_compile_prepend() {
     sed -i -e "s:SYS_LIBDIR=.*:SYS_LIBDIR=${libdir}:g" \