diff --git a/System/Posix/Env.hsc b/System/Posix/Env.hsc
--- a/System/Posix/Env.hsc
+++ b/System/Posix/Env.hsc
@@ -38,6 +38,10 @@
 import Foreign.Storable
 import Control.Monad
 import Data.Maybe (fromMaybe)
+#ifdef __GLASGOW_HASKELL__
+import GHC.IO.Encoding (getFileSystemEncoding)
+import qualified GHC.Foreign as GHC
+#endif
 #if __GLASGOW_HASKELL__ > 700
 import System.Posix.Internals (withFilePath, peekFilePath)
 #elif __GLASGOW_HASKELL__ > 611
@@ -53,6 +57,13 @@
 peekFilePath = peekCString
 #endif
 
+newFilePath :: String -> IO CString
+#ifdef __GLASGOW_HASKELL__
+newFilePath s = getFileSystemEncoding >>= (`GHC.newCString` s)
+#else
+newFilePath = newCString
+#endif
+
 -- |'getEnv' looks up a variable in the environment.
 
 getEnv :: String -> IO (Maybe String)
@@ -137,7 +148,11 @@
 -- and is equivalent to @setEnv(key,value,True{-overwrite-})@.
 
 putEnv :: String -> IO ()
-putEnv keyvalue = withFilePath keyvalue $ \s ->
+putEnv keyvalue = newFilePath keyvalue >>= \s ->
+  -- IMPORTANT: Do not free `s` after calling putenv!
+  --
+  -- According to SUSv2, the string passed to putenv becomes part of the
+  -- enviroment.
   throwErrnoIfMinus1_ "putenv" (c_putenv s)
 
 foreign import ccall unsafe "putenv"
diff --git a/System/Posix/Signals.hsc b/System/Posix/Signals.hsc
--- a/System/Posix/Signals.hsc
+++ b/System/Posix/Signals.hsc
@@ -299,7 +299,7 @@
 raiseSignal :: Signal -> IO ()
 raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig)
 
-#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) || defined(netbsd_HOST_OS)
+#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(darwin_HOST_OS))
 foreign import ccall unsafe "genericRaise"
   c_raise :: CInt -> IO CInt
 #else
diff --git a/unix.cabal b/unix.cabal
--- a/unix.cabal
+++ b/unix.cabal
@@ -1,5 +1,5 @@
 name:		unix
-version:        2.6.0.0
+version:        2.6.0.1
 license:	BSD3
 license-file:	LICENSE
 maintainer:	libraries@haskell.org
