mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Improved portability
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@863 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ae500c07ef
commit
359ad952ff
1 changed files with 2 additions and 2 deletions
|
@ -329,7 +329,7 @@ int WIPX_StringToAddr (char *string, struct sockaddr_qstorage *addr)
|
||||||
|
|
||||||
buf[2] = 0;
|
buf[2] = 0;
|
||||||
Q_memset(addr, 0, sizeof(struct sockaddr_qstorage));
|
Q_memset(addr, 0, sizeof(struct sockaddr_qstorage));
|
||||||
addr->sa_family = AF_IPX;
|
((struct sockaddr*)addr)->sa_family = AF_IPX;
|
||||||
|
|
||||||
#define DO(src,dest) \
|
#define DO(src,dest) \
|
||||||
buf[0] = string[src]; \
|
buf[0] = string[src]; \
|
||||||
|
@ -408,7 +408,7 @@ int WIPX_GetAddrFromName(char *name, struct sockaddr_qstorage *addr)
|
||||||
|
|
||||||
int WIPX_AddrCompare (struct sockaddr_qstorage *addr1, struct sockaddr_qstorage *addr2)
|
int WIPX_AddrCompare (struct sockaddr_qstorage *addr1, struct sockaddr_qstorage *addr2)
|
||||||
{
|
{
|
||||||
if (addr1->sa_family != addr2->sa_family)
|
if (((struct sockaddr*)addr1)->sa_family != ((struct sockaddr*)addr2)->sa_family)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (*((struct sockaddr_ipx *)addr1)->sa_netnum && *((struct sockaddr_ipx *)addr2)->sa_netnum)
|
if (*((struct sockaddr_ipx *)addr1)->sa_netnum && *((struct sockaddr_ipx *)addr2)->sa_netnum)
|
||||||
|
|
Loading…
Reference in a new issue