diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,10 @@
 # ChangeLog for crypton-x509-store
 
+## 1.6.14
+
+* Recovering build on Windows.
+  [#27](https://github.com/kazu-yamamoto/crypton-certificate/pull/27)
+
 ## 1.6.13
 
 * Making buildable with ghc-9.4 and ghc-9.2.
diff --git a/Data/X509/File.hs b/Data/X509/File.hs
--- a/Data/X509/File.hs
+++ b/Data/X509/File.hs
@@ -6,6 +6,10 @@
     PEMError (..),
 ) where
 
+#ifndef MIN_VERSION_unix
+#define MIN_VERSION_unix(x, y, z) 0
+#endif
+
 import Control.Applicative
 import Control.Exception (Exception (..), throw)
 import Data.ASN1.BinaryEncoding
@@ -16,7 +20,7 @@
 import Data.PEM (PEM, pemContent, pemName, pemParseLBS)
 import qualified Data.X509 as X509
 import Data.X509.Memory (pemToKey)
-#if !defined(mingw32_HOST_OS) && (MIN_VERSION_unix(2,8,0))
+#if defined(MIN_VERSION_unix) && MIN_VERSION_unix(2,8,0)
 import System.Posix.IO
 #endif
 
@@ -28,12 +32,12 @@
 
 readPEMs :: FilePath -> IO [PEM]
 readPEMs filepath = do
-#if defined(mingw32_HOST_OS) || !(MIN_VERSION_unix(2,8,0))
-    content <- L.readFile filepath
-#else
+#if defined(MIN_VERSION_unix) && MIN_VERSION_unix(2,8,0)
     fd <- openFd filepath ReadOnly defaultFileFlags{cloexec = True}
     h <- fdToHandle fd
     content <- L.hGetContents h
+#else
+    content <- L.readFile filepath
 #endif
     either (throw . PEMError) pure $ pemParseLBS content
 
diff --git a/crypton-x509-store.cabal b/crypton-x509-store.cabal
--- a/crypton-x509-store.cabal
+++ b/crypton-x509-store.cabal
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               crypton-x509-store
-version:            1.6.13
+version:            1.6.14
 license:            BSD3
 license-file:       LICENSE
 copyright:          Vincent Hanquez <vincent@snarc.org>
