Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
497 B

/*
* Public domain
* sys/socket.h compatibility shim
*/
#include_next <sys/socket.h>
#ifndef SA_LEN
#define SA_LEN(X) \
(((struct sockaddr*)(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \
((struct sockaddr*)(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : \
((struct sockaddr*)(X))->sa_family == AF_UNSPEC ? sizeof(struct sockaddr) : \
sizeof(struct sockaddr))
/*
* Prevent Solaris 10 system header leakage
*/
#ifdef MODEMASK
#undef MODEMASK
#endif
#endif