From bed97d1806cd0e06a3e3acf1893a0d5e3d9b1744 Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 5 Apr 2008 15:10:50 +0000 Subject: I hope this makes the code work on solaris, too and fix the EINVAL on sendto() git-svn-id: svn://svn.icculus.org/quake3/trunk@1293 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/net_ip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'code') diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 41918e9..5c66f80 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -550,9 +550,9 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) { } else { if(addr.ss_family == AF_INET) - ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) ); - else - ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) ); + ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) ); + else if(addr.ss_family == AF_INET6) + ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6) ); } if( ret == SOCKET_ERROR ) { int err = socketError; -- cgit v1.2.3