Same thing here. AFAIK, we only support IPv4 from master servers anyway, so once again, sue me (or fix it better :). Fixed sendto() size argument to be sizeof(struct sockaddr_in). Now uses netinc.h

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2219 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2006-04-16 02:46:26 +00:00
parent 7f8dbdb90e
commit 9f1f8850bb

View file

@ -21,24 +21,12 @@
#ifdef _WIN32
#include "winquake.h"
#define USEIPX
#define EWOULDBLOCK WSAEWOULDBLOCK
#define ECONNREFUSED WSAECONNREFUSED
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define EMSGSIZE WSAEMSGSIZE
#define ECONNABORTED WSAECONNABORTED
#define ECONNRESET WSAECONNRESET
#define qerrno WSAGetLastError()
#else
#define qerrno errno
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <errno.h>
typedef int SOCKET;
#endif
#include "common/netinc.h"
#ifdef AF_IPX
#define USEIPX
#endif
@ -754,7 +742,7 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
pollsocketsUDP[lastpollsockUDP] = UDP_OpenSocket(PORT_ANY, true);
if (pollsocketsUDP[lastpollsockUDP]==INVALID_SOCKET)
return; //bother
ret = sendto (pollsocketsUDP[lastpollsockUDP], data, len, 0, (struct sockaddr *)&addr, sizeof(addr) );
ret = sendto (pollsocketsUDP[lastpollsockUDP], data, len, 0, (struct sockaddr *)&addr, sizeof(struct sockaddr_in) );
}
if (ret == -1)