Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion System/Directory/Internal/C_utimensat.hsc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# LANGUAGE CApiFFI #-}

module System.Directory.Internal.C_utimensat where
#include <HsDirectoryConfig.h>
#ifdef HAVE_UTIMENSAT
Expand Down Expand Up @@ -41,7 +43,7 @@ toCTimeSpec t = CTimeSpec (CTime sec) (truncate $ 10 ^ (9 :: Int) * frac)
(sec, frac) = if frac' < 0 then (sec' - 1, frac' + 1) else (sec', frac')
(sec', frac') = properFraction (toRational t)

foreign import ccall "utimensat" c_utimensat
foreign import capi "sys/stat.h utimensat" c_utimensat
:: CInt -> CString -> Ptr CTimeSpec -> CInt -> IO CInt

#endif