IPv6 compile fixes from doneill (slightly modded)

This commit is contained in:
Bill Currie 2003-02-11 05:59:08 +00:00
parent f7d29ae4c6
commit eaa82b1439

View file

@ -136,7 +136,7 @@ byte net_message_buffer[MAX_UDP_PACKET];
#endif #endif
void static void
NetadrToSockadr (netadr_t *a, struct sockaddr_in6 *s) NetadrToSockadr (netadr_t *a, struct sockaddr_in6 *s)
{ {
memset (s, 0, sizeof (*s)); memset (s, 0, sizeof (*s));
@ -149,7 +149,7 @@ NetadrToSockadr (netadr_t *a, struct sockaddr_in6 *s)
#endif #endif
} }
void static void
SockadrToNetadr (struct sockaddr_in6 *s, netadr_t *a) SockadrToNetadr (struct sockaddr_in6 *s, netadr_t *a)
{ {
memcpy (a->ip, &s->sin6_addr, sizeof (s->sin6_addr)); memcpy (a->ip, &s->sin6_addr, sizeof (s->sin6_addr));
@ -157,7 +157,7 @@ SockadrToNetadr (struct sockaddr_in6 *s, netadr_t *a)
a->family = s->sin6_family; a->family = s->sin6_family;
} }
qboolean static qboolean
NET_AdrIsLoopback (netadr_t a) NET_AdrIsLoopback (netadr_t a)
{ {
if (IN6_IS_ADDR_LOOPBACK ((struct in6_addr *) &a.ip)) if (IN6_IS_ADDR_LOOPBACK ((struct in6_addr *) &a.ip))
@ -423,10 +423,11 @@ NET_SendPacket (int length, void *data, netadr_t to)
} }
} }
int static int
UDP_OpenSocket (int port) UDP_OpenSocket (int port)
{ {
char Buf[BUFSIZ], *Host, *Service; char Buf[BUFSIZ];
const char *Host, *Service;
int newsocket, Error; int newsocket, Error;
struct sockaddr_in6 address; struct sockaddr_in6 address;
struct addrinfo hints, *res; struct addrinfo hints, *res;
@ -500,7 +501,7 @@ UDP_OpenSocket (int port)
return newsocket; return newsocket;
} }
void static void
NET_GetLocalAddress (void) NET_GetLocalAddress (void)
{ {
char buff[MAXHOSTNAMELEN]; char buff[MAXHOSTNAMELEN];