Skip to content

Commit 5676bc9

Browse files
committed
TTL is CInt on Linux.
1 parent b1df8f2 commit 5676bc9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Network/Socket/Posix/Cmsg.hsc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ decodeCmsg (Cmsg _ (PS fptr off len))
106106
----------------------------------------------------------------
107107

108108
-- | Time to live of IPv4.
109+
#if defined(darwin_HOST_OS)
109110
newtype IPv4TTL = IPv4TTL CChar deriving (Eq, Show, Storable)
111+
#else
112+
newtype IPv4TTL = IPv4TTL CInt deriving (Eq, Show, Storable)
113+
#endif
110114

111115
instance ControlMessage IPv4TTL where
112116
controlMessageId _ = CmsgIdIPv4TTL

0 commit comments

Comments
 (0)