Skip to content

Commit

Permalink
using sockaddrStorageLen for sizeOfSockAddr SockAddrUnix.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Feb 15, 2018
1 parent 831fac6 commit c3e2e2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Network/Socket/Types.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ type CSaFamily = (#type sa_family_t)
-- in that the value of the argument /is/ used.
sizeOfSockAddr :: SockAddr -> Int
#if defined(DOMAIN_SOCKET_SUPPORT)
sizeOfSockAddr SockAddrUnix{} = #const sizeof(struct sockaddr_un)
sizeOfSockAddr SockAddrUnix{} = sockaddrStorageLen
#else
sizeOfSockAddr SockAddrUnix{} = error "sizeOfSockAddr: not supported"
#endif
Expand Down

0 comments on commit c3e2e2e

Please sign in to comment.