avoid build warning on windows

This commit is contained in:
Joey Hess 2023-03-27 12:20:35 -04:00
parent 291ad8f6b2
commit cb6cb61ca1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -204,7 +204,12 @@ lockContentUsing contentlocker key fallback a = withContentLockFile key $ \mlock
alreadylocked = giveup "content is locked"
failedtolock e = giveup $ "failed to lock content: " ++ show e
lock locker mlockfile = tryIO $ locker >>= \case
#ifndef mingw32_HOST_OS
lock locker mlockfile =
#else
lock locker _mlockfile =
#endif
tryIO $ locker >>= \case
Nothing -> alreadylocked
Just h ->
#ifndef mingw32_HOST_OS