diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -3,9 +3,8 @@
 Systemd offers some functionnalities to developpers for creating daemons process
 
 
-- Whatchdog (http://www.freedesktop.org/software/systemd/man/sd_notify.html)
-- Socket activation (http://0pointer.de/blog/projects/socket-activation.html)
+- [Watchdog](http://www.freedesktop.org/software/systemd/man/sd_notify.html)
+- [Socket activation](http://0pointer.de/blog/projects/socket-activation.html)
 - journal log
 
-Available on hackage
-http://hackage.haskell.org/package/systemd-1.1.0/docs/System-Systemd-Daemon.html
+Documentation and the package is [available on hackage](https://hackage.haskell.org/package/systemd/docs/System-Systemd-Daemon.html)
diff --git a/System/Systemd/Daemon.hs b/System/Systemd/Daemon.hs
--- a/System/Systemd/Daemon.hs
+++ b/System/Systemd/Daemon.hs
@@ -126,7 +126,7 @@
 --
 -- Usefull for zero downtime restart
 storeFd :: Socket -> IO (Maybe ())
-storeFd sock = socketToFd sock >>= Fd.storeFd
+storeFd sock = socketToFd_ sock >>= Fd.storeFd
 
 -- | Notify systemd to store a socket for us and specify a name.
 --
@@ -134,7 +134,7 @@
 --
 -- Usefull for zero downtime restart
 storeFdWithName :: Socket -> String -> IO (Maybe ())
-storeFdWithName sock name = socketToFd sock >>= flip Fd.storeFdWithName name
+storeFdWithName sock name = socketToFd_ sock >>= flip Fd.storeFdWithName name
 
 -- | Notify systemd about an event
 --
@@ -153,7 +153,7 @@
 -- It is up to the caller to properly set the message
 -- (i.e: do not forget to set FDSTORE=1)
 notifyWithFD :: Bool -> String -> Socket -> IO (Maybe ())
-notifyWithFD unset_env state sock = socketToFd sock >>= Fd.notifyWithFD unset_env state
+notifyWithFD unset_env state sock = socketToFd_ sock >>= Fd.notifyWithFD unset_env state
 
 ------------------------------------------------------------------------------------------------
 --  SOCKET
diff --git a/System/Systemd/Internal.hs b/System/Systemd/Internal.hs
--- a/System/Systemd/Internal.hs
+++ b/System/Systemd/Internal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE ForeignFunctionInterface #-}
 module System.Systemd.Internal where
 
@@ -72,8 +73,12 @@
 
             return ()
 
-socketToFd :: Socket -> IO Fd
-socketToFd = fmap Fd . fdSocket
+socketToFd_ :: Socket -> IO Fd
+#if ! MIN_VERSION_network(3,1,0)
+socketToFd_ = fmap Fd . fdSocket
+#else
+socketToFd_ = fmap Fd . unsafeFdSocket
+#endif
 
 fdToSocket :: Fd -> IO Socket
 fdToSocket = mkSocket . fromIntegral
diff --git a/systemd.cabal b/systemd.cabal
--- a/systemd.cabal
+++ b/systemd.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                systemd
-version:             2.1.0
+version:             2.2.0
 synopsis:            Systemd facilities (Socket activation, Notify)
 description:         A module for Systemd facilities.
 homepage:            https://github.com/erebe/systemd
