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.

12 lines
319 B

  1. /*
  2. * Public domain
  3. * sys/socket.h compatibility shim
  4. */
  5. #include_next <sys/socket.h>
  6. #ifndef SA_LEN
  7. #define SA_LEN(X) \
  8. (((struct sockaddr*)(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \
  9. ((struct sockaddr*)(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr))
  10. #endif