ifdef out the definition of setCloseOnExec on Windows; fixes the build
authorIan Lynagh <igloo@earth.li>
Fri, 20 Feb 2009 17:30:41 +0000 (17:30 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 20 Feb 2009 17:30:41 +0000 (17:30 +0000)
System/Posix/Internals.hs

index 276f841..8711a2e 100644 (file)
@@ -339,11 +339,13 @@ setNonBlockingFD _ = return ()
 -- -----------------------------------------------------------------------------
 -- Set close-on-exec for a file descriptor
 
+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
 setCloseOnExec :: FD -> IO ()
 setCloseOnExec fd = do
   throwErrnoIfMinus1 "setCloseOnExec" $
     c_fcntl_write fd const_f_setfd const_fd_cloexec
   return ()
+#endif
 
 -- -----------------------------------------------------------------------------
 -- foreign imports