diff --git a/System/FileLock/Internal/Flock.hsc b/System/FileLock/Internal/Flock.hsc
--- a/System/FileLock/Internal/Flock.hsc
+++ b/System/FileLock/Internal/Flock.hsc
@@ -39,7 +39,11 @@
 
 open :: FilePath -> IO Fd
 open path = do
+#if MIN_VERSION_unix(2,8,0)
+  fd <- openFd path WriteOnly defaultFileFlags
+#else
   fd <- openFd path WriteOnly (Just stdFileMode) defaultFileFlags
+#endif
   -- Ideally, we would open the file descriptor with CLOEXEC enabled, but since
   -- unix 2.8 hasn't been released yet and we want backwards compatibility with
   -- older releases, we set CLOEXEC after opening the file descriptor.  This
diff --git a/filelock.cabal b/filelock.cabal
--- a/filelock.cabal
+++ b/filelock.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                filelock
-version:             0.1.1.3
+version:             0.1.1.4
 synopsis:            Portable interface to file locking (flock / LockFileEx)
 description:         This package provides an interface to Windows and Unix
                      file locking functionalities.
