fix build on windows

Utility.OpenFile is posix only
This commit is contained in:
Joey Hess 2024-10-18 10:17:07 -04:00
parent fbe4530989
commit 14336b9660
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 7 additions and 0 deletions

View file

@ -5,8 +5,12 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.OpenFile where
#ifndef mingw32_HOST_OS
import System.IO
import System.Posix.IO
import GHC.IO.FD
@ -30,3 +34,5 @@ openFileBeingWritten f = do
fd <- openFdWithMode f ReadOnly Nothing defaultFileFlags
(fd', fdtype) <- mkFD (fromIntegral fd) ReadMode (Just (Stream, 0, 0)) False False
mkHandleFromFD fd' fdtype (fromRawFilePath f) ReadMode False Nothing
#endif

View file

@ -48,3 +48,4 @@ full logs are on smaug or for a while on [github actions](https://github.com/dat
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
> [[fixed|done]] --[[Joey]]