From eb8e30a2f16741de61278438fcdee9100e9847db Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Aug 2023 18:27:12 -0400 Subject: [PATCH] fix build with unix-2.8.0 got the arguments the wrong way around when I wrote this also squelch a build warning --- Annex/Link.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Annex/Link.hs b/Annex/Link.hs index dfb18a3d57..ec4eab2baa 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -44,8 +44,11 @@ import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy as L import qualified System.FilePath.ByteString as P #ifndef mingw32_HOST_OS +#if MIN_VERSION_unix(2,8,0) +#else import System.PosixCompat.Files (isSymbolicLink) #endif +#endif type LinkTarget = S.ByteString @@ -435,7 +438,7 @@ isPointerFile f = catchDefaultIO Nothing $ #else #if MIN_VERSION_unix(2,8,0) bracket - (openFd (fromRawFilePath f) ReadOnly (defaultFileFlags { nofollow = True }) Nothing) + (openFd (fromRawFilePath f) ReadOnly (defaultFileFlags { nofollow = True })) closeFd (\fd -> readhandle =<< fdToHandle fd) #else