diff --git a/Network/Sendfile/Types.hs b/Network/Sendfile/Types.hs
--- a/Network/Sendfile/Types.hs
+++ b/Network/Sendfile/Types.hs
@@ -2,11 +2,13 @@
 
 module Network.Sendfile.Types where
 
+#ifdef VERSION_unix
 import qualified Data.ByteString as B
 
 import qualified System.Posix.IO            as P
 import qualified System.Posix.IO.ByteString as PB
 import qualified System.Posix.Types         as P
+#endif
 
 -- |
 --  File range for 'sendfile'.
@@ -17,6 +19,9 @@
                  , rangeLength :: Integer
                  }
 
+-- To avoid build error in windows
+#ifdef VERSION_unix
+
 -- | 'openFd's signature changed in @unix-2.8@. This is a portable wrapper.
 openFd :: FilePath -> P.OpenMode -> P.OpenFileFlags -> IO P.Fd
 #if MIN_VERSION_unix(2,8,0)
@@ -31,4 +36,6 @@
 openFdBS path mode flags = PB.openFd path mode flags
 #else
 openFdBS path mode flags = PB.openFd path mode Nothing flags
+#endif
+
 #endif
diff --git a/simple-sendfile.cabal b/simple-sendfile.cabal
--- a/simple-sendfile.cabal
+++ b/simple-sendfile.cabal
@@ -1,5 +1,5 @@
 Name:                   simple-sendfile
-Version:                0.2.29
+Version:                0.2.30
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -23,7 +23,7 @@
   GHC-Options:          -Wall
   Exposed-Modules:      Network.Sendfile
   Other-Modules:        Network.Sendfile.Types
-  Build-Depends:        base >= 4 && < 5
+  Build-Depends:        base >= 4.8 && < 5
                       , network
                       , bytestring
   -- NetBSD and OpenBSD don't have sendfile
