From: Joey Hess Date: Wed, 2 Aug 2023 14:08:00 +0000 (-0400) Subject: avoid cpp failure on windows X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~36^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8adafdd013aec60d23916929eeea9ed5f040e030;p=git-annex.git avoid cpp failure on windows 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. --- diff --git a/Utility/OpenFd.hs b/Utility/OpenFd.hs index c46e36f25d..16a364a4d1 100644 --- a/Utility/OpenFd.hs +++ b/Utility/OpenFd.hs @@ -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