From 14336b96600b1a94f2dea90bac4c0fdbcb8b369e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 Oct 2024 10:17:07 -0400 Subject: [PATCH] fix build on windows Utility.OpenFile is posix only --- Utility/OpenFile.hs | 6 ++++++ ...dows_FTBFS__58___Could_not_find_module_System.Posix.mdwn | 1 + 2 files changed, 7 insertions(+) diff --git a/Utility/OpenFile.hs b/Utility/OpenFile.hs index 99ac696039..1af701f0b6 100644 --- a/Utility/OpenFile.hs +++ b/Utility/OpenFile.hs @@ -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 diff --git a/doc/bugs/windows_FTBFS__58___Could_not_find_module_System.Posix.mdwn b/doc/bugs/windows_FTBFS__58___Could_not_find_module_System.Posix.mdwn index c4cf83a944..ecf21f559b 100644 --- a/doc/bugs/windows_FTBFS__58___Could_not_find_module_System.Posix.mdwn +++ b/doc/bugs/windows_FTBFS__58___Could_not_find_module_System.Posix.mdwn @@ -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]]