diff --git a/compiler/GHC/Runtime/Utils.hs b/compiler/GHC/Runtime/Utils.hs
index 083d592990639f08b15aedc8dbc59e778383ec6d..0c882c47c1c8aeb120174d9fd39684a0f6d82f39 100644
--- a/compiler/GHC/Runtime/Utils.hs
+++ b/compiler/GHC/Runtime/Utils.hs
@@ -29,7 +29,7 @@ foreign import ccall "io.h _close"
    c__close :: CInt -> IO CInt
 
 foreign import ccall unsafe "io.h _get_osfhandle"
-   _get_osfhandle :: CInt -> IO CInt
+   _get_osfhandle :: CInt -> IO CIntPtr
 
 runWithPipesPOSIX :: (CreateProcess -> IO ProcessHandle)
                   -> FilePath -> [String] -> [String] -> IO (ProcessHandle, Handle, Handle)