fix more windows errors

master
an 2019-12-12 17:23:12 -05:00
parent eede3d0586
commit 3fd11cc5c4
3 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,7 @@ static void WINS_GetLocalAddress(void)
myAddr = *(in_addr_t *)local->h_addr_list[0];
addr = ntohl(myAddr);
sprintf(my_tcpip_address, "%" PRIi64 ".%" PRIi64 ".%" PRIi64 ".%" PRIi64, (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
sprintf(my_tcpip_address, "%li.%li.%li.%li", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
}
@ -325,6 +325,7 @@ static int32_t PartialIPAddress(const char *in, struct qsockaddr *hostaddr)
int32_t WINS_Connect(sys_socket_t socketid, struct qsockaddr *addr)
{
(void)socketid, (void)addr;
return 0;
}

View File

@ -214,6 +214,7 @@ int32_t WIPX_CloseSocket(sys_socket_t handle)
int32_t WIPX_Connect(sys_socket_t handle, struct qsockaddr *addr)
{
(void)handle, (void)addr;
return 0;
}

View File

@ -150,6 +150,8 @@ static void Sys_GetBasedir(char *argv0, char *dst, size_t dstsize)
char *tmp;
size_t rc;
(void)argv0;
rc = GetCurrentDirectory(dstsize, dst);
if(rc == 0 || rc > dstsize)
Sys_Error("Couldn't determine current directory");