diff options
-rw-r--r-- | System/Posix/Env.hsc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/System/Posix/Env.hsc b/System/Posix/Env.hsc index 1c85805..f1ec317 100644 --- a/System/Posix/Env.hsc +++ b/System/Posix/Env.hsc @@ -55,12 +55,11 @@ foreign import ccall unsafe "getenv" getEnvironmentPrim :: IO [String] getEnvironmentPrim = do - c_environ <- peek c_environ_p - arr <- peekArray0 nullPtr c_environ + arr <- peekArray0 nullPtr c_environ_p mapM peekCString arr foreign import ccall unsafe "&environ" - c_environ_p :: Ptr (Ptr CString) + c_environ_p :: Ptr CString -- |'getEnvironment' retrieves the entire environment as a -- list of @(key,value)@ pairs. |