about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/www_tcp.h
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2001-06-11 01:14:52 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2001-06-11 01:14:52 -0400
commit244151ea1ed7b05051bd92a653bbde57c8194061 (patch)
tree13b8c5ac42c66347c61173e7d5929f738374b006 /WWW/Library/Implementation/www_tcp.h
parent1f734c80c35ae04b3e8b0b82707d643f52852c6d (diff)
downloadlynx-snapshots-244151ea1ed7b05051bd92a653bbde57c8194061.tar.gz
snapshot of project "lynx", label v2-8-4pre_2
Diffstat (limited to 'WWW/Library/Implementation/www_tcp.h')
-rw-r--r--WWW/Library/Implementation/www_tcp.h4
1 files changed, 4 insertions, 0 deletions
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