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:
parent
7f8dbdb90e
commit
9f1f8850bb
1 changed files with 3 additions and 15 deletions
|
@ -21,24 +21,12 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "winquake.h"
|
#include "winquake.h"
|
||||||
#define USEIPX
|
#define USEIPX
|
||||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
|
||||||
#define ECONNREFUSED WSAECONNREFUSED
|
|
||||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
|
||||||
#define EMSGSIZE WSAEMSGSIZE
|
|
||||||
#define ECONNABORTED WSAECONNABORTED
|
|
||||||
#define ECONNRESET WSAECONNRESET
|
|
||||||
|
|
||||||
#define qerrno WSAGetLastError()
|
|
||||||
#else
|
#else
|
||||||
#define qerrno errno
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <errno.h>
|
|
||||||
typedef int SOCKET;
|
typedef int SOCKET;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "common/netinc.h"
|
||||||
|
|
||||||
#ifdef AF_IPX
|
#ifdef AF_IPX
|
||||||
#define USEIPX
|
#define USEIPX
|
||||||
#endif
|
#endif
|
||||||
|
@ -754,7 +742,7 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
|
||||||
pollsocketsUDP[lastpollsockUDP] = UDP_OpenSocket(PORT_ANY, true);
|
pollsocketsUDP[lastpollsockUDP] = UDP_OpenSocket(PORT_ANY, true);
|
||||||
if (pollsocketsUDP[lastpollsockUDP]==INVALID_SOCKET)
|
if (pollsocketsUDP[lastpollsockUDP]==INVALID_SOCKET)
|
||||||
return; //bother
|
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)
|
if (ret == -1)
|
||||||
|
|
Loading…
Reference in a new issue