From 606cb9abb0ac334b124b7c18574f112fb2ed4e1a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 18 Sep 2002 15:31:44 +0000 Subject: [PATCH] hopefully fix compiling in Irix --- nq/include/net.h | 4 ++-- nq/source/net_dgrm.c | 2 +- nq/source/net_udp.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nq/include/net.h b/nq/include/net.h index a874e0669..d95550e43 100644 --- a/nq/include/net.h +++ b/nq/include/net.h @@ -35,8 +35,8 @@ struct qsockaddr { - short sa_family; - unsigned char sa_data[14]; + short qsa_family; + unsigned char qsa_data[14]; }; diff --git a/nq/source/net_dgrm.c b/nq/source/net_dgrm.c index 974571475..1fe962765 100644 --- a/nq/source/net_dgrm.c +++ b/nq/source/net_dgrm.c @@ -1030,7 +1030,7 @@ _Datagram_CheckNewConnections (void) } #ifdef BAN_TEST // check for a ban - if (clientaddr.sa_family == AF_INET) { + if (clientaddr.qsa_family == AF_INET) { unsigned long testAddr; testAddr = ((struct sockaddr_in *) &clientaddr)->sin_addr.s_addr; diff --git a/nq/source/net_udp.c b/nq/source/net_udp.c index beb95e5bc..131ccacec 100644 --- a/nq/source/net_udp.c +++ b/nq/source/net_udp.c @@ -281,7 +281,7 @@ PartialIPAddress (const char *in, struct qsockaddr *hostaddr) else port = net_hostport; - hostaddr->sa_family = AF_INET; + hostaddr->qsa_family = AF_INET; ((struct sockaddr_in *) hostaddr)->sin_port = htons ((short) port); ((struct sockaddr_in *) hostaddr)->sin_addr.s_addr = @@ -393,7 +393,7 @@ UDP_StringToAddr (const char *string, struct qsockaddr *addr) sscanf (string, "%d.%d.%d.%d:%d", &ha1, &ha2, &ha3, &ha4, &hp); ipaddr = (ha1 << 24) | (ha2 << 16) | (ha3 << 8) | ha4; - addr->sa_family = AF_INET; + addr->qsa_family = AF_INET; ((struct sockaddr_in *) addr)->sin_addr.s_addr = htonl (ipaddr); ((struct sockaddr_in *) addr)->sin_port = htons (hp); return 0; @@ -445,7 +445,7 @@ UDP_GetAddrFromName (const char *name, struct qsockaddr *addr) if (!hostentry) return -1; - addr->sa_family = AF_INET; + addr->qsa_family = AF_INET; ((struct sockaddr_in *) addr)->sin_port = htons (net_hostport); ((struct sockaddr_in *) addr)->sin_addr.s_addr = @@ -457,7 +457,7 @@ UDP_GetAddrFromName (const char *name, struct qsockaddr *addr) int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2) { - if (addr1->sa_family != addr2->sa_family) + if (addr1->qsa_family != addr2->qsa_family) return -1; if (((struct sockaddr_in *) addr1)->sin_addr.s_addr !=