[oe-commits] Andreas Oberritter : netkit-base-0.17: fix compile with gcc-4.x

git version control git at git.openembedded.org
Wed Oct 6 22:35:17 UTC 2010


Module: openembedded.git
Branch: master
Commit: c475f6629653994e9c2911b6d8d09aec5a063dd7
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c475f6629653994e9c2911b6d8d09aec5a063dd7

Author: Andreas Oberritter <obi at opendreambox.org>
Date:   Mon Oct  4 03:52:41 2010 +0000

netkit-base-0.17: fix compile with gcc-4.x

* v2: Added header to patch.
* v3: Set CFLAGS and LDFLAGS correctly.

Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
Acked-by: Paul Menzel <paulepanter at users.sourceforge.net>
Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../netkit-base-0.17/gcc4_buildfix.patch           |   19 +++++++++++++++++++
 recipes/netkit-base/netkit-base_0.17.bb            |    9 +++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/recipes/netkit-base/netkit-base-0.17/gcc4_buildfix.patch b/recipes/netkit-base/netkit-base-0.17/gcc4_buildfix.patch
new file mode 100644
index 0000000..b5b476c
--- /dev/null
+++ b/recipes/netkit-base/netkit-base-0.17/gcc4_buildfix.patch
@@ -0,0 +1,19 @@
+upstream: unmaintained
+source: org.openembedded.dreambox fb4bee1268b9a0600fd6236ac0e9245f17b33f95
+
+| servtab.c: In function 'loadconfigent':
+| servtab.c:785:4: error: lvalue required as left operand of assignment
+[...]
+| servtab.c:798:4: error: lvalue required as left operand of assignment
+
+--- bla/inetd/servtab.c	2000-07-22 22:20:50.000000000 +0200
++++ bla/inetd/servtab.c	2006-03-01 15:26:46.000000000 +0100
+@@ -771,7 +771,7 @@
+ 			return;
+ 		}
+ 		
+-#define SWAP(type, a, b) {type c=(type)a; (type)a=(type)b; (type)b=(type)c;}
++#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}
+ 
+ 		/*
+ 		 * sep->se_wait may be holding the pid of a daemon
diff --git a/recipes/netkit-base/netkit-base_0.17.bb b/recipes/netkit-base/netkit-base_0.17.bb
index c9864ae..8ab8935 100644
--- a/recipes/netkit-base/netkit-base_0.17.bb
+++ b/recipes/netkit-base/netkit-base_0.17.bb
@@ -1,11 +1,12 @@
 SECTION = "base"
 DESCRIPTION = "netkit-base includes the inetd daemon."
 LICENSE = "BSD"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-base-${PV}.tar.gz \
            file://configure.patch \
            file://mconfig.patch \
+           file://gcc4_buildfix.patch \
            file://init \
            file://inetd.conf"
 
@@ -17,7 +18,11 @@ INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 0 1 6 ."
 EXTRA_OEMAKE = "-C inetd"
 
 do_compile () {
-	oe_runmake 'CC=${CC}' 'LD=${LD}' all
+        sed -e 's:^CC=.*:CC=${CC}:' \
+            -e 's:^CFLAGS=.*:CFLAGS=${CFLAGS}:' \
+            -e 's:^LDFLAGS=.*:LDFLAGS=${LDFLAGS}:' \
+            -i ${S}/MCONFIG
+        oe_runmake
 }
 
 do_install () {





More information about the Openembedded-commits mailing list