aboutsummaryrefslogtreecommitdiffstats
path: root/testing/erlang/replace_glibc_check.patch
blob: 170bbbb118d55143770047e08366e362f1fc8b80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);