Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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)
/**********************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment