avoid cpp failure on windows
authorJoey Hess <joeyh@joeyh.name>
Wed, 2 Aug 2023 14:08:00 +0000 (10:08 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 2 Aug 2023 14:08:00 +0000 (10:08 -0400)
Seems that while the module is not imported by anything on windows, it
still gets cpped, and MIN_VERSION_unix is not defined so it failed to
preprocess.

Utility/OpenFd.hs

index c46e36f25db8139f4277f30f0dbc89e755be109d..16a364a4d1113f14157f98a0705e2020e285fd68 100644 (file)
@@ -8,9 +8,9 @@
 {-# LANGUAGE CPP #-}
 {-# OPTIONS_GHC -fno-warn-tabs #-}
 
-module Utility.OpenFd (
-       openFdWithMode,
-) where
+module Utility.OpenFd where
+
+#ifndef mingw32_HOST_OS
 
 import System.Posix.IO.ByteString
 import System.Posix.Types
@@ -23,3 +23,5 @@ openFdWithMode f openmode filemode flags =
 #else
 openFdWithMode = openFd
 #endif
+
+#endif