aboutsummaryrefslogtreecommitdiffstats
path: root/testing/erlang17/replace_glibc_check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/erlang17/replace_glibc_check.patch')
-rw-r--r--testing/erlang17/replace_glibc_check.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/erlang17/replace_glibc_check.patch b/testing/erlang17/replace_glibc_check.patch
new file mode 100644
index 0000000000..170bbbb118
--- /dev/null
+++ b/testing/erlang17/replace_glibc_check.patch
@@ -0,0 +1,20 @@
+--- otp_src_17.4/lib/erl_interface/src/connect/ei_resolve.c
++++ otp_src_17.4-fixed/lib/erl_interface/src/connect/ei_resolve.c
+@@ -615,7 +615,7 @@
+ #ifndef HAVE_GETHOSTBYNAME_R
+ return my_gethostbyaddr_r(addr,length,type,hostp,buffer,buflen,h_errnop);
+ #else
+-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
++#if (defined(_BSD_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
+ struct hostent *result;
+
+ gethostbyaddr_r(addr, length, type, hostp, buffer, buflen, &result,
+@@ -642,7 +642,7 @@
+ #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(_BSD_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
+ struct hostent *result;
+
+ gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);