I hope this makes the code work on solaris, too and fix the EINVAL on sendto()

This commit is contained in:
Thilo Schulz 2008-04-05 15:10:50 +00:00
parent 70cd2ccfab
commit fcbf0bdd84

View file

@ -550,9 +550,9 @@ void Sys_SendPacket( int length, const void *data, netadr_t to ) {
} }
else { else {
if(addr.ss_family == AF_INET) if(addr.ss_family == AF_INET)
ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) ); ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) );
else else if(addr.ss_family == AF_INET6)
ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) ); ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6) );
} }
if( ret == SOCKET_ERROR ) { if( ret == SOCKET_ERROR ) {
int err = socketError; int err = socketError;