diff options
author | Joey Hess <joeyh@joeyh.name> | 2023-08-01 18:41:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2023-08-01 18:41:27 -0400 |
commit | 68c9b08faf3a4f937b792736da1ddf4340449f9e (patch) | |
tree | e6a8d9673a47f16091568c2d6b5d007af8392e23 /Git | |
parent | 4ef16f53ed809fc574e185f613dddaef09d8a237 (diff) |
fix build with unix-2.8.0
Changed the parameters to openFd. So needed to add a small wrapper
library to keep supporting older versions as well.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/LockFile.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Git/LockFile.hs b/Git/LockFile.hs index 218a9588cd..fa92df046e 100644 --- a/Git/LockFile.hs +++ b/Git/LockFile.hs @@ -12,6 +12,7 @@ module Git.LockFile where import Common #ifndef mingw32_HOST_OS +import Utility.OpenFd import System.Posix.Types import System.Posix.IO #else @@ -51,7 +52,7 @@ openLock' :: FilePath -> IO LockHandle openLock' lck = do #ifndef mingw32_HOST_OS -- On unix, git simply uses O_EXCL - h <- openFd lck ReadWrite (Just 0O666) + h <- openFdWithMode (toRawFilePath lck) ReadWrite (Just 0O666) (defaultFileFlags { exclusive = True }) setFdOption h CloseOnExec True #else |