]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
socket.c: Add extern int h_errno for rtems since networking header files are not...
authorJoel Sherrill <joel.sherrill@oarcorp.com>
Mon, 21 Nov 2005 23:31:50 +0000 (23:31 +0000)
committerJoel Sherrill <joel@gcc.gnu.org>
Mon, 21 Nov 2005 23:31:50 +0000 (23:31 +0000)
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

gcc/ada/ChangeLog
gcc/ada/socket.c

index 60ed170784f1de2b11a92a079eef439011ba1ada..8afd38c1b6f47cb70d2db830803054f74626a2bf 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2005-11-19  Richard Guenther  <rguenther@suse.de>
        Roger Sayle  <roger@eyesopen.com>
 
index d02763a9548ca04b4fa4896f2a32ffc085ff5039..bb79ac30a72f155f27b858d8875555cecfd7ff87 100644 (file)
@@ -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