As of this morning, Ada no longer compiles for *-rtems.
I think this change broke it.

2005-11-14 Thomas Quinot  <[EMAIL PROTECTED]>

 * socket.c (__gnat_get_h_errno): New function to retrieve h_errno, the
   hosts database last error code.

RTEMS has networking functions but they are not available at this stage
during the build.  You only have the .h files provided with newlib.  So
this patch is needed to make *-rtems compile again.  OK to commit?


Index: gcc/ada/socket.c
===================================================================
--- gcc/ada/socket.c    (revision 107093)
+++ gcc/ada/socket.c    (working copy)
@@ -190,6 +190,10 @@
 #elif defined(VMS)
   return errno;
 #else
+#if defined(__rtems__)
+  /* No networking .h files are available from newlib so extern this. */
+  extern int h_errno;
+#endif
   return h_errno;
 #endif
 }




--
Joel Sherrill, Ph.D.             Director of Research & Development
[EMAIL PROTECTED]                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

Reply via email to