aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/User.hsc
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2008-08-21 12:01:38 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2008-08-21 12:01:38 +0000
commit7f033077b8b0c618c3c1cad5a40898c2837a8969 (patch)
tree1d83a75fb9120fca119701b37a02e3130a8250e3 /System/Posix/User.hsc
parentc1180fec9f1121323b519ea86fd730b29f1b2f6d (diff)
Fix warnings in the unix package
Diffstat (limited to 'System/Posix/User.hsc')
-rw-r--r--System/Posix/User.hsc3
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