Skip to content

Commit d040a33

Browse files
committed
fixing the Storable instance.
1 parent 5f3706f commit d040a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Network/Socket/Unix.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ getPeerCred s = do
8282
newtype PeerCred = PeerCred (CUInt, CUInt, CUInt)
8383
instance Storable PeerCred where
8484
sizeOf _ = (#const sizeof(struct ucred))
85-
alignment _ = (#const sizeof(int))
86-
poke = undefined
85+
alignment _ = alignment (undefined :: CInt)
86+
poke _ _ = return ()
8787
peek p = do
8888
pid <- (#peek struct ucred, pid) p
8989
uid <- (#peek struct ucred, uid) p

0 commit comments

Comments
 (0)