1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 20:33:58 +02:00
openwrt-packages/lang/erlang/patches/102-musl_compat.patch
Nicolas Thill d4afd14ff1 erlang: fix musl compatibility
gethostbyname_r is available when _GNU_SOURCE is defined, add a patch to check for it instead of __GLIBC__, build with -D_GNU_SOURCE, bump release number

Signed-off-by: Nicolas Thill <nico@openwrt.org>
2015-06-23 01:06:36 +02:00

12 lines
578 B
Diff

--- a/lib/erl_interface/src/connect/ei_resolve.c
+++ b/lib/erl_interface/src/connect/ei_resolve.c
@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const
#ifndef HAVE_GETHOSTBYNAME_R
return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
#else
-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
+#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
struct hostent *result;
gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);