diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+#### 0.1.3.1 *2023-06-23*
+
+	* Support building with `unix-2.8`.
+
 #### 0.1.3.0 *2018-06-21*
 
 	* Use raw POSIX io to write to proc files (Baojun Wang).
diff --git a/System/Linux/Namespaces.hsc b/System/Linux/Namespaces.hsc
--- a/System/Linux/Namespaces.hsc
+++ b/System/Linux/Namespaces.hsc
@@ -130,7 +130,7 @@
         setNamespace fd (Just ns)
   where
     openFd' = ioeSetLoc "enterNamespace" $
-        openFd path ReadOnly Nothing defaultFileFlags {nonBlock = True}
+        openFd path ReadOnly defaultFileFlags {nonBlock = True}
     path = toProcPath (Just pid) ns
 
 -- | A unique namespace id.
@@ -215,7 +215,7 @@
 
 writeProcFile :: FilePath -> ByteString -> IO ()
 writeProcFile path bs =
-    bracket (openFd path WriteOnly Nothing defaultFileFlags) closeFd $ \fd ->
+    bracket (openFd path WriteOnly defaultFileFlags) closeFd $ \fd ->
         S.useAsCStringLen bs $ \(ptr, nb) ->
             fdWriteBuf fd (castPtr ptr) (fromIntegral nb) >> return ()
 
diff --git a/linux-namespaces.cabal b/linux-namespaces.cabal
--- a/linux-namespaces.cabal
+++ b/linux-namespaces.cabal
@@ -1,5 +1,5 @@
 name:                linux-namespaces
-version:             0.1.3.0
+version:             0.1.3.1
 synopsis:            Work with linux namespaces: create new or enter existing ones
 description:
   This library provides bindings to the @unshare(2)@ and @setns(2)@ linux
@@ -23,7 +23,7 @@
 
 library
   exposed-modules:     System.Linux.Namespaces
-  build-depends:       base >=4.6 && <5, unix >=2.6, bytestring >=0.10
+  build-depends:       base >=4.6 && <5, unix >=2.8 && <3.0, bytestring >=0.10 && <1.0
   build-tools:         hsc2hs
   default-language:    Haskell2010
   ghc-options:         -Wall
