diff -uNr gcc-4.5.0-orig/gcc/ada/g-socket.adb gcc-4.5.0/gcc/ada/g-socket.adb
--- gcc-4.5.0-orig/gcc/ada/g-socket.adb	2009-12-01 03:52:51.000000000 -0600
+++ gcc-4.5.0/gcc/ada/g-socket.adb	2010-07-19 08:28:52.000000000 -0500
@@ -1748,6 +1748,14 @@
          return Resource_Temporarily_Unavailable;
       end if;
 
+      if Error_Value = ESHUTDOWN then
+         return Cannot_Send_After_Transport_Endpoint_Shutdown;
+      end if;
+
+      if Error_Value = ESOCKTNOSUPPORT then
+         return Socket_Type_Not_Supported;
+      end if;
+
       pragma Warnings (On);
 
       case Error_Value is
@@ -1788,9 +1796,6 @@
          when EPIPE           => return Broken_Pipe;
          when EPROTONOSUPPORT => return Protocol_Not_Supported;
          when EPROTOTYPE      => return Protocol_Wrong_Type_For_Socket;
-         when ESHUTDOWN       => return
-                                 Cannot_Send_After_Transport_Endpoint_Shutdown;
-         when ESOCKTNOSUPPORT => return Socket_Type_Not_Supported;
          when ETIMEDOUT       => return Connection_Timed_Out;
          when ETOOMANYREFS    => return Too_Many_References;
          when EWOULDBLOCK     => return Resource_Temporarily_Unavailable;
diff -uNr gcc-4.5.0-orig/gcc/ada/gsocket.h gcc-4.5.0/gcc/ada/gsocket.h
--- gcc-4.5.0-orig/gcc/ada/gsocket.h	2009-06-22 07:24:57.000000000 -0500
+++ gcc-4.5.0/gcc/ada/gsocket.h	2010-07-15 15:25:30.000000000 -0500
@@ -179,14 +179,11 @@
 #endif
 
 /*
- * RTEMS has these .h files but not until you have built RTEMS.  When
- * IN_RTS, you only have the .h files in the newlib C library.
- * Because this file is also included from gen-soccon.c which is built
- * to run on RTEMS (not IN_RTS), we must distinguish between IN_RTS
- * and using this file to compile gen-soccon.
+ * RTEMS has these .h files but not until you have built RTEMS.  So
+ * you MUST build and install RTEMS multilib WITH networking enabled
+ * before you build an Ada toolset.
  */
-#if !(defined (VMS) || defined (__MINGW32__) || \
-      (defined(__rtems__) && defined(IN_RTS)))
+#if !(defined (VMS) || defined (__MINGW32__))
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
