diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-04-05 15:10:50 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-04-05 15:10:50 +0000 |
commit | bed97d1806cd0e06a3e3acf1893a0d5e3d9b1744 (patch) | |
tree | 8a93e21b47121a331f7d3996aa07dd02ff148749 /code | |
parent | 524ae69d527e2ce41f2e7dc3050b2fcc17264878 (diff) | |
download | ioquake3-aero-bed97d1806cd0e06a3e3acf1893a0d5e3d9b1744.tar.gz ioquake3-aero-bed97d1806cd0e06a3e3acf1893a0d5e3d9b1744.zip |
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
Diffstat (limited to 'code')
-rw-r--r-- | code/qcommon/net_ip.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |