summaryrefslogtreecommitdiff
path: root/libs/libnet-1.2.x
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-06-17 23:31:40 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-06-17 23:36:41 +0200
commite4925c1efdd4b8caf8f19c8c3b2aba544459863b (patch)
tree34c83116a2474afe22e0dbd70f3d9e54304b4e31 /libs/libnet-1.2.x
parent4116e327afee80aaea33a16358f5f7c0da687bec (diff)
libnet-1.2.x: fix musl compatiblity
The correct includes for musl are protected by an __GLIBC__ check in the upstream sources. Since musl does not provide own defines to identify itself, simply invert the condition to !__UCLIBC__ in order to fix the build on all libc flavors supported by OpenWrt. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'libs/libnet-1.2.x')
-rw-r--r--libs/libnet-1.2.x/Makefile2
-rw-r--r--libs/libnet-1.2.x/patches/100-musl-compat.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/libs/libnet-1.2.x/Makefile b/libs/libnet-1.2.x/Makefile
index f3b5dcdc7..a9d7e7508 100644
--- a/libs/libnet-1.2.x/Makefile
+++ b/libs/libnet-1.2.x/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libnet
PKG_VERSION:=1.2-rc3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
diff --git a/libs/libnet-1.2.x/patches/100-musl-compat.patch b/libs/libnet-1.2.x/patches/100-musl-compat.patch
new file mode 100644
index 000000000..fcb4188a0
--- /dev/null
+++ b/libs/libnet-1.2.x/patches/100-musl-compat.patch
@@ -0,0 +1,11 @@
+--- a/src/libnet_link_linux.c
++++ b/src/libnet_link_linux.c
+@@ -30,7 +30,7 @@
+ #include <sys/time.h>
+
+ #include <net/if.h>
+-#if (__GLIBC__)
++#if (!__UCLIBC__)
+ #include <netinet/if_ether.h>
+ #include <net/if_arp.h>
+ #else