aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2005-11-21 23:31:50 +0000
committerJoel Sherrill <joel@gcc.gnu.org>2005-11-21 23:31:50 +0000
commit04b5d587d0ced15441ef47f12f7170d2aed0bc3f (patch)
treeb0b6d8d1d37dad9d942abc948411563e9fef36bc /gcc/ada/socket.c
parent46636d314f8c601e2c3fe52591db5e46359e50b3 (diff)
downloadgcc-04b5d587d0ced15441ef47f12f7170d2aed0bc3f.zip
gcc-04b5d587d0ced15441ef47f12f7170d2aed0bc3f.tar.gz
gcc-04b5d587d0ced15441ef47f12f7170d2aed0bc3f.tar.bz2
socket.c: Add extern int h_errno for rtems since networking header files are not...
2005-11-21 Joel Sherrill <joel.sherrill@oarcorp.com> * socket.c: Add extern int h_errno for rtems since networking header files are not available at this point in a tool bootstrap. Newlib only has basic C library header files. From-SVN: r107331
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r--gcc/ada/socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index d02763a..bb79ac3 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -189,6 +189,13 @@ __gnat_get_h_errno (void) {
}
#elif defined(VMS)
return errno;
+#elif defined(__rtems__)
+ /* At this stage in the tool build, no networking .h files are available.
+ Newlib does not provide networking .h files and RTEMS is not built yet.
+ So we need to explicitly extern h_errno to access it.
+ */
+ extern int h_errno;
+ return h_errno;
#else
return h_errno;
#endif