--- ghc-8.10.7/libraries/unix/System/Posix/Semaphore.hsc 2020-04-19 14:47:09.000000000 +0530 +++ ghc-8.10.7-patch/libraries/unix/System/Posix/Semaphore.hsc 2022-04-11 12:43:10.193206043 +0530 @@ -3,6 +3,7 @@ #else {-# LANGUAGE Trustworthy #-} #endif +{-# LANGUAGE CApiFFI #-} ----------------------------------------------------------------------------- -- | -- Module : System.Posix.Semaphore @@ -114,11 +115,11 @@ cint <- peek ptr return $ fromEnum cint -foreign import ccall safe "sem_open" +foreign import capi safe "semaphore.h sem_open" sem_open :: CString -> CInt -> CMode -> CUInt -> IO (Ptr ()) -foreign import ccall safe "sem_close" +foreign import capi safe "semaphore.h sem_close" sem_close :: Ptr () -> IO CInt -foreign import ccall safe "sem_unlink" +foreign import capi safe "semaphore.h sem_unlink" sem_unlink :: CString -> IO CInt foreign import ccall safe "sem_wait"