summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marvin Schmidt <marv@exherbo.org> 2019-10-19 20:03:33 +0200
committerAvatar Marvin Schmidt <marv@exherbo.org> 2019-10-21 08:34:17 +0200
commit306d0515fb551339ddd136367b04ebfa041e4013 (patch)
tree5d7961418dbf028eb96a7c8479803e656116a8bf
parent73b9476ce3d56fe4cd3f7619a3bb12cd1b7ebca3 (diff)
downloadarbor-306d0515fb551339ddd136367b04ebfa041e4013.tar.gz
arbor-306d0515fb551339ddd136367b04ebfa041e4013.tar.xz
dhcpcd: Backport patch to fix build for musl systems
-rw-r--r--packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-03
-rw-r--r--packages/net-misc/dhcpcd/files/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch29
2 files changed, 32 insertions, 0 deletions
diff --git a/packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-0 b/packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-0
index e636ecd5b..432581b47 100644
--- a/packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-0
+++ b/packages/net-misc/dhcpcd/dhcpcd-8.1.1.exheres-0
@@ -30,6 +30,9 @@ DEPENDENCIES="
providers:systemd? ( sys-apps/systemd )
"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch
+)
DEFAULT_SRC_CONFIGURE_PARAMS=(
--dbdir=/var/lib/dhcpcd
--libexecdir=/usr/$(exhost --target)/lib/dhcpcd
diff --git a/packages/net-misc/dhcpcd/files/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch b/packages/net-misc/dhcpcd/files/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch
new file mode 100644
index 000000000..185f00c45
--- /dev/null
+++ b/packages/net-misc/dhcpcd/files/a7dccb87f6bcd7e59b29e96d0d554448e8462d25.patch
@@ -0,0 +1,29 @@
+From a7dccb87f6bcd7e59b29e96d0d554448e8462d25 Mon Sep 17 00:00:00 2001
+From: Peter Bui <pbui@nd.edu>
+Date: Sat, 19 Oct 2019 10:20:38 -0400
+Subject: [PATCH] Fix building on systems with musl
+Upstream: Yes, https://github.com/rsmarples/dhcpcd/commit/91792b015b249d0a3e229c3b56586c378cf9fe90
+
+musl has its own definition of struct ethhdr, so only include
+netinet/if_ether.h on systems with GLIBC. For the ARPHDR constants, we
+must include linux/if_arp.h instead.
+---
+ src/if-linux.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/if-linux.c b/src/if-linux.c
+index fd472785..218335ee 100644
+--- a/src/if-linux.c
++++ b/src/if-linux.c
+@@ -46,7 +46,11 @@
+
+ #include <arpa/inet.h>
+ #include <net/if.h>
++#if defined(__GLIBC__)
+ #include <netinet/if_ether.h>
++#else
++#include <linux/if_arp.h>
++#endif
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <net/route.h>