Skip to content
Snippets Groups Projects
Commit f6b288bd authored by redneb's avatar redneb Committed by Rufflewind
Browse files

Use capi for syscalls that break under musl's handling of 64-bit time_t

Closes #145.
parent 10242804
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE CApiFFI #-}
module System.Directory.Internal.C_utimensat where
#include <HsDirectoryConfig.h>
#ifdef HAVE_UTIMENSAT
......@@ -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
Changelog for the [`directory`][1] package
==========================================
* Use CApiFFI for utimensat.
([#145](https://github.com/haskell/directory/pull/145))
## 1.3.8.0 (Sep 2022)
* Drop support for `base` older than 4.11.0.
......
......@@ -36,7 +36,7 @@ source-repository head
Library
default-language: Haskell2010
other-extensions: CPP
other-extensions: CApiFFI, CPP
exposed-modules:
System.Directory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment