summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-12-06 18:07:25 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-12-06 18:11:12 +0100
commitb9f636b3aa962154c1b1515a3acecfbe9071b308 (patch)
treea62a24620d5daa7f3886dbdecdf77ad792ace7e5
parent7383ce98e06a75e416bb8f810932acc9f607f906 (diff)
downloadhaskell-b9f636b3aa962154c1b1515a3acecfbe9071b308.tar.gz
Set proper `CTYPE` for POSIX `CGroup`
This fixes https://github.com/haskell/unix/issues/20 which is about compile warnings due to incompatible pointer types of the kind warning: passing argument 5 of ‘getgrnam_r’ from incompatible pointer type HsInt32 ghc...(void* a1, void* a2, void* a3, HsWord64 a4, void** a5) {return getgrnam_r(a1, a2, a3, a4, a5);} note: expected ‘struct group ** __restrict__’ but argument is of type ‘void **’ extern int getgrnam_r (const char *__restrict __name, Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
-rw-r--r--libraries/base/System/Posix/Internals.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index 30bf19c5a4..c49e61359a 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -63,7 +63,7 @@ puts s = withCAStringLen (s ++ "\n") $ \(p, len) -> do
-- Types
type CFLock = ()
-type CGroup = ()
+data {-# CTYPE "struct group" #-} CGroup
type CLconv = ()
type CPasswd = ()
type CSigaction = ()