mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
win32 compile fixes
This commit is contained in:
parent
d88f2a255b
commit
ffb90a510a
2 changed files with 5 additions and 6 deletions
|
@ -233,8 +233,7 @@ Qdopen (int fd, const char *mode)
|
|||
int zip = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
if (file->file)
|
||||
setmode (_fileno (file->file), O_BINARY);
|
||||
setmode (fd, O_BINARY);
|
||||
#endif
|
||||
for (p = m; *mode && p - m < (sizeof (m) - 1); mode++) {
|
||||
if (*mode == 'z') {
|
||||
|
|
|
@ -378,7 +378,7 @@ PartialIPAddress (const char *in, struct qsockaddr *hostaddr)
|
|||
else
|
||||
port = net_hostport;
|
||||
|
||||
hostaddr->sa_family = AF_INET;
|
||||
hostaddr->qsa_family = AF_INET;
|
||||
((struct sockaddr_in *) hostaddr)->sin_port = htons ((short) port);
|
||||
|
||||
((struct sockaddr_in *) hostaddr)->sin_addr.s_addr =
|
||||
|
@ -511,7 +511,7 @@ WINS_StringToAddr (const char *string, struct qsockaddr *addr)
|
|||
sscanf (string, "%d.%d.%d.%d:%d", &ha1, &ha2, &ha3, &ha4, &hp);
|
||||
ipaddr = (ha1 << 24) | (ha2 << 16) | (ha3 << 8) | ha4;
|
||||
|
||||
addr->sa_family = AF_INET;
|
||||
addr->qsa_family = AF_INET;
|
||||
((struct sockaddr_in *) addr)->sin_addr.s_addr = htonl (ipaddr);
|
||||
((struct sockaddr_in *) addr)->sin_port = htons ((unsigned short) hp);
|
||||
return 0;
|
||||
|
@ -569,7 +569,7 @@ WINS_GetAddrFromName (const char *name, struct qsockaddr *addr)
|
|||
if (!hostentry)
|
||||
return -1;
|
||||
|
||||
addr->sa_family = AF_INET;
|
||||
addr->qsa_family = AF_INET;
|
||||
((struct sockaddr_in *) addr)->sin_port = htons ((unsigned short) net_hostport);
|
||||
|
||||
((struct sockaddr_in *) addr)->sin_addr.s_addr =
|
||||
|
@ -583,7 +583,7 @@ WINS_GetAddrFromName (const char *name, struct qsockaddr *addr)
|
|||
int
|
||||
WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2)
|
||||
{
|
||||
if (addr1->sa_family != addr2->sa_family)
|
||||
if (addr1->qsa_family != addr2->qsa_family)
|
||||
return -1;
|
||||
|
||||
if (((struct sockaddr_in *) addr1)->sin_addr.s_addr !=
|
||||
|
|
Loading…
Reference in a new issue