From 2ff555ff0e711a1f75b4b7054b50650a6d6770b4 Mon Sep 17 00:00:00 2001 From: Thanassis Tsiodras Date: Wed, 8 Mar 2017 09:20:17 +0000 Subject: [PATCH] re PR ada/79903 (When building GCC-cross compiler for RTEMS/SPARC with Ada support, the build fails because of missing #ifdef) PR ada/79903 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__. From-SVN: r245972 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/socket.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 549559be355..d592da38f56 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2017-03-08 Thanassis Tsiodras + + PR ada/79903 + * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__. + 2017-03-08 Eric Botcazou PR ada/79945 diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index f5fb6635ee2..5cdd656e34b 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -202,7 +202,7 @@ __gnat_gethostbyaddr (const char *addr, int len, int type, struct hostent *rh; int ri; -#if defined(__linux__) || defined(__GLIBC__) +#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__) (void) gethostbyaddr_r (addr, len, type, ret, buf, buflen, &rh, h_errnop); #else rh = gethostbyaddr_r (addr, len, type, ret, buf, buflen, h_errnop); -- 2.30.2