package/socat: fix musl build
PATCH 1/1 package/socat: fix musl build
Fixes
http://autobuild.buildroot.net/results/d6e/d6e6f42450c8ad2c54b61d0950b6823f18628bc6/
Signed-off-by Bernd Kuhls <[email protected]>
--- package/socat/0002-musl.patch | 18 ++++++++++++++++++ package/socat/0003-netdb-internal.patch | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 package/socat/0002-musl.patch create mode 100644 package/socat/0003-netdb-internal.patch
package/socat/0002-musl.patch new file +18 -0
@@ -0,0 +1,18 @@ +Fix musl build + +Downloaded from +http://git.alpinelinux.org/cgit/aports/tree/main/socat/use-linux-headers.patch + +Signed-off-by: Bernd Kuhls <[email protected]> + +--- socat-1.7.2.4.orig/sysincludes.h ++++ socat-1.7.2.4/sysincludes.h +@@ -134,7 +134,7 @@ + #include <netpacket/packet.h> + #endif + #if HAVE_NETINET_IF_ETHER_H +-#include <netinet/if_ether.h> ++#include <linux/if_ether.h> + #endif + #if HAVE_LINUX_IF_TUN_H + #include <linux/if_tun.h>
package/socat/0003-netdb-internal.patch new file +20 -0
@@ -0,0 +1,20 @@ +Fix musl build + +Downloaded from +http://git.alpinelinux.org/cgit/aports/tree/main/socat/netdb-internal.patch + +Signed-off-by: Bernd Kuhls <[email protected]> + +--- socat-1.7.2.4.orig/compat.h ++++ socat-1.7.2.4/compat.h +@@ -656,6 +656,10 @@ + # define NETDB_INTERNAL h_NETDB_INTERNAL + #endif + ++#if !defined(NETDB_INTERNAL) ++# define NETDB_INTERNAL (-1) ++#endif ++ + #ifndef INET_ADDRSTRLEN + # define INET_ADDRSTRLEN sizeof(struct sockaddr_in) + #endif
Signature · 1 line
2.7.0.rc3
PATCH 1/1 package/socat: fix musl build
Bernd,
Quoted 8 lines · Bernd Kuhls
+---
socat-1.7.2.4.orig/sysincludes.h
++++socat-1.7.2.4/sysincludes.h
+@@ -134,7 +134,7 @@
+ #include <netpacket/packet.h>
+ #endif
+ #ifHAVE_NETINET_IF_ETHER_H
+-#include <netinet/if_ether.h>
++#include <linux/if_ether.h>
This looks wrong: the configure check now verifies if <netinet/if_ether.h> exists, if that's the case, HAVE_NETINET_IF_ETHER_H is defined, but the code includes <linux/if_ether.h> ? Not good.
Quoted 12 lines
package/socat/0003-netdb-internal.patch new file +6
-0@@ -0,0 +1,20 @@ +Fix musl build + +Downloaded from +http://git.alpinelinux.org/cgit/aports/tree/main/socat/netdb-internal.patch + +Signed-off-by: Bernd Kuhls <[email protected]>
package/socat/0003-netdb-internal.patch line 16
Quoted 10 lines
package/socat/0003-netdb-internal.patch new file +10
-0+ +--- socat-1.7.2.4.orig/compat.h ++++ socat-1.7.2.4/compat.h +@@ -656,6 +656,10 @@ + # define NETDB_INTERNAL h_NETDB_INTERNAL + #endif + ++#if !defined(NETDB_INTERNAL) ++# define NETDB_INTERNAL (-1) ++#endif
This also looks suspicious, and at the very least needs some proper patch description.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com