Commit 5be364b7 authored by deuce's avatar deuce
Browse files

Define a new xp_sockaddr_len() macro to deal with Linux et. al.

parent 68fbc72e
......@@ -106,6 +106,9 @@ union xp_sockaddr {
#endif
struct sockaddr_storage store;
};
#define xp_sockaddr_len(a) ((((struct sockaddr *)a)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) : ((struct sockaddr *)a)->sa_len)
/**********************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment