--- /dev/null
+--- ./src/boa.h.org Fri Dec 14 03:15:46 2001
++++ ./src/boa.h Sat Dec 22 23:52:55 2001
+@@ -25,6 +25,11 @@
+ #ifndef _BOA_H
+ #define _BOA_H
+
++#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
++
+ #include "config.h"
+ /* config.h should be 1st include because this sets lots of #defines that
+ are used in other header files
+@@ -187,6 +192,6 @@
+ /* ip */
+ int bind_server(int server_s, char *server_ip);
+ char *ascii_sockaddr(struct SOCKADDR *s, char *dest, int len);
+-int net_port(struct SOCKADDR *s);
++int net_port(struct sockaddr *s);
+
+ #endif
+--- ./src/ip.c.org Sat Dec 22 23:34:29 2001
++++ ./src/ip.c Sat Dec 22 23:51:28 2001
+@@ -45,6 +45,7 @@
+ #include "boa.h"
+ #include "compat.h"
+ #include <arpa/inet.h> /* inet_ntoa */
++#include <linux/socket.h>
+
+ /* Binds to the existing server_s, based on the configuration string
+ in server_ip. IPv6 version doesn't pay attention to server_ip yet. */
+@@ -84,7 +85,7 @@
+ *dest = '\0';
+ }
+ #ifdef WHEN_DOES_THIS_APPLY
+- if ((s->__ss_family == AF_INET6) &&
++ if ((s->sa_family == AF_INET6) &&
+ IN6_IS_ADDR_V4MAPPED(&(((struct sockaddr_in6 *) s)->sin6_addr))) {
+ strncpy(dest, dest + 7, NI_MAXHOST);
+ }
+@@ -95,11 +96,11 @@
+ return dest;
+ }
+
+-int net_port(struct SOCKADDR *s)
++int net_port(struct sockaddr *s)
+ {
+ int p;
+ #ifdef INET6
+- switch (s->__ss_family) {
++ switch (s->sa_family) {
+ case AF_INET:
+ p = ntohs(((struct sockaddr_in *) s)->sin_port);
+ break;
+@@ -108,7 +109,7 @@
+ break;
+ default:
+ fprintf(stderr, "[IPv6] family isn't supported: %d\n",
+- s->__ss_family);
++ s->sa_family);
+ p = 0;
+ }
+ #else
+--- ./src/request.c.org Sat Dec 22 23:34:29 2001
++++ ./src/request.c Sat Dec 22 23:56:36 2001
+@@ -68,13 +68,13 @@
+ void get_request(int server_s)
+ {
+ int fd; /* socket */
+- struct SOCKADDR remote_addr; /* address */
++ struct sockaddr remote_addr; /* address */
+ int remote_addrlen = sizeof (struct sockaddr_in);
+ request *conn; /* connection */
+ int len;
+ static int system_bufsize = 0; /* Default size of SNDBUF given by system */
+
+- remote_addr.S_FAMILY = 0xdead;
++ remote_addr.sa_family = 0xdead;
+ fd = accept(server_s, (struct sockaddr *) &remote_addr,
+ &remote_addrlen);
+