diff options
author | 2008-08-21 12:01:38 +0000 | |
---|---|---|
committer | 2008-08-21 12:01:38 +0000 | |
commit | 7f033077b8b0c618c3c1cad5a40898c2837a8969 (patch) | |
tree | 1d83a75fb9120fca119701b37a02e3130a8250e3 /System/Posix/User.hsc | |
parent | c1180fec9f1121323b519ea86fd730b29f1b2f6d (diff) |
Fix warnings in the unix package
Diffstat (limited to 'System/Posix/User.hsc')
-rw-r--r-- | System/Posix/User.hsc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/System/Posix/User.hsc b/System/Posix/User.hsc index 71d3fd2..01079c2 100644 --- a/System/Posix/User.hsc +++ b/System/Posix/User.hsc @@ -50,7 +50,7 @@ import Foreign.C import System.Posix.Internals ( CGroup, CPasswd ) #if !defined(HAVE_GETPWNAM_R) || !defined(HAVE_GETPWUID_R) || defined(HAVE_GETPWENT) || defined(HAVE_GETGRENT) -import Control.Concurrent.MVar ( newMVar, withMVar ) +import Control.Concurrent.MVar ( MVar, newMVar, withMVar ) #endif #ifdef HAVE_GETPWENT import Control.Exception @@ -272,6 +272,7 @@ data UserEntry = -- Also, getpwent/setpwent require a global lock since they maintain -- an internal file position pointer. #if !defined(HAVE_GETPWNAM_R) || !defined(HAVE_GETPWUID_R) || defined(HAVE_GETPWENT) || defined(HAVE_GETGRENT) +lock :: MVar () lock = unsafePerformIO $ newMVar () {-# NOINLINE lock #-} #endif |