From 244151ea1ed7b05051bd92a653bbde57c8194061 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 11 Jun 2001 01:14:52 -0400 Subject: snapshot of project "lynx", label v2-8-4pre_2 --- WWW/Library/Implementation/www_tcp.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'WWW/Library/Implementation/www_tcp.h') diff --git a/WWW/Library/Implementation/www_tcp.h b/WWW/Library/Implementation/www_tcp.h index 9de8ea51..f3f5ac65 100644 --- a/WWW/Library/Implementation/www_tcp.h +++ b/WWW/Library/Implementation/www_tcp.h @@ -830,6 +830,10 @@ typedef struct sockaddr_in SockA; /* See netinet/in.h */ #ifdef SIN6_LEN #define SOCKADDR_LEN(soc_address) ((struct sockaddr *)&soc_address)->sa_len #else +#ifndef SA_LEN +#define SA_LEN(x) (((x)->sa_family == AF_INET6)?sizeof(struct sockaddr_in6): \ + (((x)->sa_family == AF_INET)?sizeof(struct sockaddr_in):sizeof(struct sockaddr))) +#endif #define SOCKADDR_LEN(soc_address) SA_LEN((struct sockaddr *)&soc_address) #endif /* SIN6_LEN */ #else -- cgit 1.4.1-2-gfad0