From 8adafdd013aec60d23916929eeea9ed5f040e030 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Aug 2023 10:08:00 -0400 Subject: [PATCH] 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. --- Utility/OpenFd.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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