1 From e7804d1750652e39c7a5803d360b29b2637a695f Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@gmail.com>
3 Date: Sun, 28 Aug 2016 21:04:01 +0200
4 Subject: [PATCH] compat: set NETDB_INTERNAL
6 Musl doesn't provide NETDB_INTERNAL which is defined in resolv/netdb.h
9 Set NETDB_INTERNAL to -1 locally if not already defined.
12 [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/netdb.h;h=3aba530932c7a62a4f23e3193e9186da677f552b;hb=fdfc9260b61d3d72541f18104d24c7bcb0ce5ca2#l74
13 [2] http://git.alpinelinux.org/cgit/aports/tree/main/socat/netdb-internal.patch?id=5a45173b50892cb634197c30b3506ebff98d3b7d
15 Signed-off-by: Romain Naour <romain.naour@gmail.com>
18 1 file changed, 2 insertions(+)
20 diff --git a/compat.h b/compat.h
21 index 19a929f..4f5ee6d 100644
24 @@ -666,6 +666,8 @@ typedef int sig_atomic_t;
26 #if !defined(NETDB_INTERNAL) && defined(h_NETDB_INTERNAL)
27 # define NETDB_INTERNAL h_NETDB_INTERNAL
28 +#elif !defined(NETDB_INTERNAL)
29 +# define NETDB_INTERNAL (-1)
32 #ifndef INET_ADDRSTRLEN