@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= socat
PKG_VERSION:= 1.7.2.2
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= fe70c821a104378a834c3ed1b5971e54
PKG_DESCR:= A multipurpose relay (SOcket CAT)
PKG_SECTION:= net/misc
@@ -0,0 +1,14 @@
+--- socat-1.7.2.2.orig/sysincludes.h 2011-12-06 08:45:03.000000000 +0100
++++ socat-1.7.2.2/sysincludes.h 2013-12-25 15:43:19.000000000 +0100
+@@ -136,9 +136,11 @@
+ #if HAVE_NETINET_IF_ETHER_H
+ #include <netinet/if_ether.h>
+ #endif
++#if defined(__GLIBC__)
+ #if HAVE_LINUX_IF_TUN_H
+ #include <linux/if_tun.h>
++#endif
+
+ #if HAVE_TERMIOS_H && _WITH_TERMIOS
+ #include <termios.h>
@@ -0,0 +1,12 @@
+--- socat-1.7.2.2.orig/xio-ip4.c 2010-10-06 09:25:30.000000000 +0200
++++ socat-1.7.2.2/xio-ip4.c 2013-12-25 15:46:30.000000000 +0100
+@@ -13,6 +13,9 @@
+ #include "xio-ip.h"
+ #include "xio-ip4.h"
++#if !defined(__GLIBC__)
++# define NETDB_INTERNAL -1
+ int xioparsenetwork_ip4(const char *rangename, struct xiorange *range) {
+ struct hostent *maskaddr;
+--- socat-1.7.2.2.orig/xio-proxy.c 2011-12-06 08:45:03.000000000 +0100
++++ socat-1.7.2.2/xio-proxy.c 2013-12-25 15:47:38.000000000 +0100
+@@ -16,6 +16,9 @@
+ #include "xio-proxy.h"
+ #define PROXYPORT "8080"
@@ -0,0 +1,15 @@
+--- socat-1.7.2.2.orig/xio-tun.c 2011-12-06 08:45:03.000000000 +0100
++++ socat-1.7.2.2/xio-tun.c 2013-12-25 15:51:46.000000000 +0100
+@@ -14,6 +14,12 @@
+ #include "xio-tun.h"
++#define IFF_TUN 0x0001
++#define IFF_TAP 0x0002
++#define IFF_NO_PI 0x1000
++#define TUNSETIFF _IOW('T', 202, int)
+ static int xioopen_tun(int argc, const char *argv[], struct opt *opts, int xioflags, xiofile_t *fd, unsigned groups, int dummy1, int dummy2, int dummy3);