[oe] [meta-networking][PATCH v2] dhcpcd: upgrade 8.0.2 -> 8.1.1

Zheng Ruoqin zhengrq.fnst at cn.fujitsu.com
Tue Oct 29 18:25:02 UTC 2019


1) Add 0001-dhcpcd-Fix-build-error-with-musl.patch to fix musl build error.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
---
 .../dhcpcd/{dhcpcd_8.0.2.bb => dhcpcd_8.1.1.bb}    |  9 ++++--
 .../0001-dhcpcd-Fix-build-error-with-musl.patch    | 33 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)
 rename meta-networking/recipes-connectivity/dhcpcd/{dhcpcd_8.0.2.bb => dhcpcd_8.1.1.bb} (79%)
 create mode 100644 meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch

diff --git a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb b/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb
similarity index 79%
rename from meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb
rename to meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb
index 79d1dad..55ee452 100644
--- a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb
+++ b/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.1.bb
@@ -11,8 +11,13 @@ UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/"
 
 SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
            file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
-SRC_URI[md5sum] = "c0375a1f725f1c191b43af60e4f7175b"
-SRC_URI[sha256sum] = "33a26ad561546cd2cfe1e6de6352a85df72b41c37def8c7eb00e90e57c627a5c"
+
+SRC_URI_append_libc-musl = " \
+    file://0001-dhcpcd-Fix-build-error-with-musl.patch \
+"
+
+SRC_URI[md5sum] = "dc4f29a62afc53cdac311e925cfd1bc7"
+SRC_URI[sha256sum] = "485d308fe10febd36b6f936e4260e4ab34a146e4f00a9f7a5509c4377ad5ea82"
 
 inherit pkgconfig autotools-brokensep
 
diff --git a/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch b/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch
new file mode 100644
index 0000000..daca881
--- /dev/null
+++ b/meta-networking/recipes-connectivity/dhcpcd/files/0001-dhcpcd-Fix-build-error-with-musl.patch
@@ -0,0 +1,33 @@
+Subject: [PATCH] dhcpcd: Fix build error with musl.
+
+Error as follows:
+In file included from if-linux.c:49:
+path/usr/include/netinet/if_ether.h:112:8: error: redefinition of 'struct ethhdr'
+
+When build with musl, define _NETINET_IF_ETHER_H and include <net/if_arp.h>.
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
+---
+ src/if-linux.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/if-linux.c b/src/if-linux.c
+index fd47278..35c5dba 100644
+--- a/src/if-linux.c
++++ b/src/if-linux.c
+@@ -46,6 +46,12 @@
+ 
+ #include <arpa/inet.h>
+ #include <net/if.h>
++
++#if !(__UCLIBC__ || __GLIBC__)
++#define _NETINET_IF_ETHER_H
++#include <net/if_arp.h>
++#endif
++
+ #include <netinet/if_ether.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+-- 
+2.7.4
+
-- 
2.7.4





More information about the Openembedded-devel mailing list