summaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-07 12:31:41 +0000
committerdoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-07 12:31:41 +0000
commit9d093602e03a80e9878b448dba638cea3167d503 (patch)
treec4c189f4e345c4b9a9a9df89c2f784f91abfe95c /gcc/ada/socket.c
parent1ac4dadbe2c311e7188f13ad8f2c8383229ee191 (diff)
downloadgcc-9d093602e03a80e9878b448dba638cea3167d503.tar.gz
2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
* sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to detect systems using GNU libc. * gsocket.h: ditto. * socket.c: ditto. * adaint.c: ditto. * link.c: ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133979 138bc75d-0d04-0410-961f-82ee72b054a4
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);