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.
This commit is contained in:
Joey Hess 2023-08-02 10:08:00 -04:00
parent 19d95c9bb8
commit 8adafdd013
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View 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