We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c783a2 commit bc10aecCopy full SHA for bc10aec
System/Posix/Fcntl.hsc
@@ -87,16 +87,11 @@ fileAdvise _ _ _ _ = return ()
87
-- @since 2.7.1.0
88
fileAllocate :: Fd -> FileOffset -> FileOffset -> IO ()
89
#if HAVE_POSIX_FALLOCATE
90
-#if defined(freebsd_HOST_OS)
91
-fileAllocate fd off len = do
92
- throwErrnoIfMinus1_ "fileAllocate" (c_posix_fallocate (fromIntegral fd) (fromIntegral off) (fromIntegral len))
93
-#else
94
fileAllocate fd off len = do
95
ret <- c_posix_fallocate (fromIntegral fd) (fromIntegral off) (fromIntegral len)
96
if ret == 0
97
then pure ()
98
else ioError (errnoToIOError "fileAllocate" (Errno ret) Nothing Nothing)
99
-#endif
100
101
foreign import capi safe "fcntl.h posix_fallocate"
102
c_posix_fallocate :: CInt -> COff -> COff -> IO CInt
0 commit comments