1
+ {-# LANGUAGE CApiFFI #-}
1
2
{-# LANGUAGE Trustworthy #-}
2
3
3
4
-----------------------------------------------------------------------------
@@ -452,12 +453,12 @@ toCTimeSpec t = CTimeSpec (CTime sec) (truncate $ 10^(9::Int) * frac)
452
453
#endif
453
454
454
455
#ifdef HAVE_UTIMENSAT
455
- foreign import ccall unsafe " utimensat"
456
+ foreign import capi unsafe " sys/stat.h utimensat"
456
457
c_utimensat :: CInt -> CString -> Ptr CTimeSpec -> CInt -> IO CInt
457
458
#endif
458
459
459
460
#if HAVE_FUTIMENS
460
- foreign import ccall unsafe " futimens"
461
+ foreign import capi unsafe " sys/stat.h futimens"
461
462
c_futimens :: CInt -> Ptr CTimeSpec -> IO CInt
462
463
#endif
463
464
@@ -480,16 +481,16 @@ toCTimeVal t = CTimeVal sec (truncate $ 10^(6::Int) * frac)
480
481
(sec, frac) = if (frac' < 0 ) then (sec' - 1 , frac' + 1 ) else (sec', frac')
481
482
(sec', frac') = properFraction $ toRational t
482
483
483
- foreign import ccall unsafe " utimes"
484
+ foreign import capi unsafe " sys/time.h utimes"
484
485
c_utimes :: CString -> Ptr CTimeVal -> IO CInt
485
486
486
487
#ifdef HAVE_LUTIMES
487
- foreign import ccall unsafe " lutimes"
488
+ foreign import capi unsafe " sys/time.h lutimes"
488
489
c_lutimes :: CString -> Ptr CTimeVal -> IO CInt
489
490
#endif
490
491
491
492
#if HAVE_FUTIMES
492
- foreign import ccall unsafe " futimes"
493
+ foreign import capi unsafe " sys/time.h futimes"
493
494
c_futimes :: CInt -> Ptr CTimeVal -> IO CInt
494
495
#endif
495
496
0 commit comments