mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-24 22:04:21 +00:00
engine: enable getaddrinfo on Windows, fix build
This commit is contained in:
parent
5d18c6d678
commit
b072b627a2
@ -23,6 +23,8 @@ GNU General Public License for more details.
|
||||
#include <WS2tcpip.h>
|
||||
typedef int WSAsize_t;
|
||||
|
||||
#define HAVE_GETADDRINFO
|
||||
|
||||
#elif !defined XASH_NO_NETWORK
|
||||
// BSD sockets
|
||||
#include <sys/types.h>
|
||||
@ -381,7 +383,7 @@ qboolean NET_GetHostByName( const char *hostname, int family, struct sockaddr_st
|
||||
return false;
|
||||
|
||||
((struct sockaddr_in *)addr)->sin_family = AF_INET;
|
||||
((struct sockaddr_in *)addr)->sin_addr = *(in_addr *)h->h_addr_list[0];
|
||||
((struct sockaddr_in *)addr)->sin_addr = *(struct in_addr *)h->h_addr_list[0];
|
||||
|
||||
return true;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user