Browse Source

fix musl compile

Waldemar Brodkorb 11 years ago
parent
commit
61ee590fc4
2 changed files with 16 additions and 1 deletions
  1. 1 1
      package/miredo/Makefile
  2. 15 0
      package/miredo/patches/patch-libtun6_tun6_c

+ 1 - 1
package/miredo/Makefile

@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		miredo
 PKG_VERSION:=		1.2.6
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		5bcdbaced54f40b6cb1e9c9a8dbac411
 PKG_DESCR:=		A Teredo client and relay daemon
 PKG_SECTION:=		ipv6

+ 15 - 0
package/miredo/patches/patch-libtun6_tun6_c

@@ -0,0 +1,15 @@
+--- miredo-1.2.6.orig/libtun6/tun6.c	2012-09-12 15:03:59.000000000 +0200
++++ miredo-1.2.6/libtun6/tun6.c	2013-12-23 17:23:42.000000000 +0100
+@@ -53,7 +53,12 @@
+ const char os_driver[] = "Linux";
+ # define USE_LINUX 1
+ 
++#if defined(__GLIBC__)
+ # include <linux/if_tun.h> // TUNSETIFF - Linux tunnel driver
++#else
++#define IFF_TUN                0x0001
++#define TUNSETIFF     _IOW('T', 202, int)
++#endif
+ /*
+  * <linux/ipv6.h> conflicts with <netinet/in.h> and <arpa/inet.h>,
+  * so we've got to declare this structure by hand.