summaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r--gcc/ada/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index 913d1ca40f6..53620c4e1a7 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -206,7 +206,7 @@ __gnat_safe_gethostbyname (const char *name,
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
@@ -223,7 +223,7 @@ __gnat_safe_gethostbyaddr (const char *addr, int len, int type,
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyaddr_r (addr, len, type, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyaddr_r (addr, len, type, ret, buf, buflen, h_errnop);
@@ -239,7 +239,7 @@ __gnat_safe_getservbyname (const char *name, const char *proto,
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
#else
rh = getservbyname_r (name, proto, ret, buf, buflen);
@@ -255,7 +255,7 @@ __gnat_safe_getservbyport (int port, const char *proto,
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
#else
rh = getservbyport_r (port, proto, ret, buf, buflen);