diff -r 5590a265b1f6 Network/Socket.hsc
--- a/Network/Socket.hsc	Thu Nov 11 15:05:18 2010 +0100
+++ b/Network/Socket.hsc	Tue Nov 23 15:40:35 2010 -0800
@@ -164,6 +164,8 @@
 
 ) where
 
+import Debug.Trace
+
 #ifdef __HUGS__
 import Hugs.Prelude ( IOException(..), IOErrorType(..) )
 import Hugs.IO ( openFd )
@@ -200,6 +202,9 @@
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Conc		(threadWaitRead, threadWaitWrite)
+#if __GLASGOW_HASKELL__ >= 700
+import GHC.Conc		(closeFd)
+#endif
 # if defined(mingw32_HOST_OS)
 import GHC.Conc		( asyncDoProc )
 import Foreign( FunPtr )
@@ -1039,6 +1044,10 @@
      return (pid, uid, gid)
 #endif
 
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 700
+closeFd close fd = close fd
+#endif
+
 #if defined(DOMAIN_SOCKET_SUPPORT)
 -- sending/receiving ancillary socket data; low-level mechanism
 -- for transmitting file descriptors, mainly.
@@ -1692,7 +1701,7 @@
 	 ioError (userError ("sClose: converted to a Handle, use hClose instead"))
      Closed ->
 	 return status
-     _ -> c_close s >> return Closed
+     _ -> closeFd (\s -> c_close (fromIntegral s) >> return ()) (fromIntegral s) >> return Closed
 
 -- -----------------------------------------------------------------------------
 
