aboutsummaryrefslogtreecommitdiff
path: root/net/socat
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-06-16 14:55:56 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-06-16 14:58:28 +0200
commita0968faedbfe58e3d76fe78dadb099f060e4acfd (patch)
tree1dbb539ccea9798d5f645e6f128cc2e591f7cc61 /net/socat
parent4116e327afee80aaea33a16358f5f7c0da687bec (diff)
socat: fix musl compatibility
Do not include netinet/if_ether.h for musl to prevent struct ethhdr redeclarations. Also define NETDB_INTERNAL if needed to fix compilation of the network backends. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'net/socat')
-rw-r--r--net/socat/Makefile4
-rw-r--r--net/socat/patches/100-musl-compat.patch23
2 files changed, 25 insertions, 2 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile
index 361a4d5cf..b89ffcad2 100644
--- a/net/socat/Makefile
+++ b/net/socat/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=socat
PKG_VERSION:=1.7.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
diff --git a/net/socat/patches/100-musl-compat.patch b/net/socat/patches/100-musl-compat.patch
new file mode 100644
index 000000000..ae5c8d0d7
--- /dev/null
+++ b/net/socat/patches/100-musl-compat.patch
@@ -0,0 +1,23 @@
+--- a/sysincludes.h
++++ b/sysincludes.h
+@@ -79,6 +79,9 @@
+ #endif
+ #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
+ #include <netdb.h> /* struct hostent, gethostbyname() */
++#if !(__UCLIBC__ || __GLIBC__)
++#define NETDB_INTERNAL -1
++#endif
+ #endif
+ #if HAVE_SYS_UN_H && WITH_UNIX
+ #include <sys/un.h> /* struct sockaddr_un, unix domain sockets */
+@@ -139,8 +142,10 @@
+ #include <netpacket/packet.h>
+ #endif
+ #if HAVE_NETINET_IF_ETHER_H
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+ #include <netinet/if_ether.h>
+ #endif
++#endif
+ #if HAVE_LINUX_IF_TUN_H
+ #include <linux/if_tun.h>
+ #endif