libnet-1.2.x: fix musl compatiblity 1410/head
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Jun 2015 21:31:40 +0000 (23:31 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Jun 2015 21:36:41 +0000 (23:36 +0200)
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>
libs/libnet-1.2.x/Makefile
libs/libnet-1.2.x/patches/100-musl-compat.patch [new file with mode: 0644]

index f3b5dcdc74c31f0e7cce53086a99f69df1400248..a9d7e750824028d844ba636e0439c3f4c00c7fcb 100644 (file)
@@ -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 (file)
index 0000000..fcb4188
--- /dev/null
@@ -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