diff --git a/Network/Fancy/Error.hs b/Network/Fancy/Error.hs
--- a/Network/Fancy/Error.hs
+++ b/Network/Fancy/Error.hs
@@ -64,13 +64,18 @@
 throwNetworkException sock desc err = throwIO $! SocketException desc sock err
 
 
+#ifdef LINUX
 strerror :: Errno -> String
 strerror (Errno val) = unsafePerformIO $
   allocaArray 512 $ \buffer -> do
     _ <- c_strerror_r val buffer 511
     peekCString buffer
 
-foreign import ccall unsafe "strerror_r" c_strerror_r :: CInt -> Ptr CChar -> CSize -> IO CInt
+foreign import ccall unsafe "__xpg_strerror_r" c_strerror_r :: CInt -> Ptr CChar -> CSize -> IO CInt
+#else
+strerror :: Errno -> String
+strerror = show
+#endif
 
 throwGAIErrorIf :: IO CInt -> IO ()
 throwGAIErrorIf comp = do
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
 # network-fancy changelog
 
+## Version 0.2.1 2014-12-09
+
+- Fix strerror_r symbol mangling with glibc
+
 ## Version 0.2.0 2014-12-09
 
 - Use NetworkExceptions for precise error reporting
diff --git a/network-fancy.cabal b/network-fancy.cabal
--- a/network-fancy.cabal
+++ b/network-fancy.cabal
@@ -1,6 +1,6 @@
 name: network-fancy
-version: 0.2.0
-cabal-version: >=1.6
+version: 0.2.1
+cabal-version: >=1.8
 build-type: Simple
 license: BSD3
 license-file: COPYING
@@ -34,6 +34,8 @@
             exposed: True
             buildable: True
             extra-libraries: socket
+        if os(linux)
+            cpp-options: -DLINUX=LINUX
         exposed: True
         buildable: True
         cpp-options: -DCALLCONV=ccall -DSAFE_ON_WIN=unsafe
@@ -46,5 +48,3 @@
     extensions: TypeSynonymInstances ForeignFunctionInterface CPP
                 DeriveDataTypeable FlexibleInstances
     ghc-options: -Wall
-
-
