fix build on windows
authorJoey Hess <joeyh@joeyh.name>
Fri, 18 Oct 2024 14:17:07 +0000 (10:17 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 18 Oct 2024 14:17:07 +0000 (10:17 -0400)
Utility.OpenFile is posix only

Utility/OpenFile.hs
doc/bugs/windows_FTBFS__58___Could_not_find_module_System.Posix.mdwn

index 99ac6960390e28a6b8a6ab8a987a79fcee4380fe..1af701f0b6e646c6a0829486514f1b333474f069 100644 (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
index c4cf83a9447b947dbe9b1de11fa1d05bcab7eb00..ecf21f559b10f712284b4cd8dfa7880570dfecc1 100644 (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]]