diff --git a/COPYING b/COPYING
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2008-2014, Taru Karttunen
+Copyright (c) 2008-2015, Taru Karttunen
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/Network/Fancy.hsc b/Network/Fancy.hsc
--- a/Network/Fancy.hsc
+++ b/Network/Fancy.hsc
@@ -203,10 +203,10 @@
   setNonBlockingFD' s
   let sock = Socket s
   let loop = do r   <- withForeignPtr sa $ \ptr -> c_connect s ptr (fromIntegral len)
-	       	err <- getErrno
-       	        case r of
+                err <- getErrno
+                case r of
                   -1 | err == eINTR       -> do loop
-		     | err == eINPROGRESS -> do threadWaitWrite (fromIntegral s)
+                     | err == eINPROGRESS -> do threadWaitWrite (fromIntegral s)
                                                 soe <- getsockopt_error s
                                                 if soe==0 then return sock else throwNetworkException sock "connect" (Errno soe)
                      |  otherwise         -> do throwNetworkException sock "connect" err
@@ -220,7 +220,7 @@
 getFamily :: SocketAddress -> IO CFamily
 getFamily (SA sa _) = worker >>= return . fromIntegral
     where worker :: IO #type sa_family_t
-	  worker = withForeignPtr sa (#peek struct sockaddr, sa_family)
+          worker = withForeignPtr sa (#peek struct sockaddr, sa_family)
 
 csas :: (SocketAddress -> IO a) -> [SocketAddress] -> IO a
 csas _ []       = throwOther NoSuchHostException
@@ -345,8 +345,8 @@
 
 foreign import CALLCONV unsafe "freeaddrinfo" c_freeaddrinfo :: Ptr AddrInfoT -> IO ()
 foreign import CALLCONV   safe "getaddrinfo"  c_getaddrinfo  :: Ptr CChar -> Ptr CChar ->
-							     Ptr AddrInfoT -> Ptr (Ptr AddrInfoT) ->
-							     IO CInt
+                                                                Ptr AddrInfoT -> Ptr (Ptr AddrInfoT) ->
+                                                                IO CInt
 
 
 
diff --git a/Network/Fancy/Error.hs b/Network/Fancy/Error.hs
--- a/Network/Fancy/Error.hs
+++ b/Network/Fancy/Error.hs
@@ -64,7 +64,7 @@
 throwNetworkException sock desc err = throwIO $! SocketException desc sock err
 
 
-#ifdef LINUX
+#ifdef HAVE_STRERROR_R
 strerror :: Errno -> String
 strerror (Errno val) = unsafePerformIO $
   allocaArray 512 $ \buffer -> 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.3 2015-06-20
+
+- Fix OS X build
+
 ## Version 0.2.2 2014-12-13
 
 - Modify Setup.hs to keep nix happy, closes #4
diff --git a/network-fancy.cabal b/network-fancy.cabal
--- a/network-fancy.cabal
+++ b/network-fancy.cabal
@@ -1,5 +1,5 @@
 name: network-fancy
-version: 0.2.2
+version: 0.2.3
 cabal-version: >=1.8
 build-type: Simple
 license: BSD3
@@ -34,8 +34,9 @@
             exposed: True
             buildable: True
             extra-libraries: socket
+        if os(linux) || os(darwin)
+            cpp-options: -DHAVE_STRERROR_R=1
         if os(linux)
-            cpp-options: -DLINUX=LINUX
             extra-libraries: pthread
         exposed: True
         buildable: True
