mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
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>
This commit is contained in:
23
net/socat/patches/100-musl-compat.patch
Normal file
23
net/socat/patches/100-musl-compat.patch
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user