From: Joel Sherrill Date: Mon, 21 Nov 2005 23:31:50 +0000 (+0000) Subject: socket.c: Add extern int h_errno for rtems since networking header files are not... X-Git-Tag: releases/gcc-4.2.0~5824 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04b5d587d0ced15441ef47f12f7170d2aed0bc3f;p=thirdparty%2Fgcc.git socket.c: Add extern int h_errno for rtems since networking header files are not... 2005-11-21 Joel Sherrill * 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 60ed170784f1..8afd38c1b6f4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2005-11-21 Joel Sherrill + + * 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. + 2005-11-19 Richard Guenther Roger Sayle diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index d02763a9548c..bb79ac30a72f 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