mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-24 18:21:34 +00:00
Fix netcode on Haiku
This commit is contained in:
parent
79dd5de63b
commit
3cf48e31d6
1 changed files with 5 additions and 0 deletions
|
@ -1211,11 +1211,16 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
|
|||
// test ip address of server
|
||||
for (i = 0; i < mysocketses; ++i)
|
||||
{
|
||||
#ifdef __HAIKU__
|
||||
// Haiku doesn't appreciate empty packets, so just hope for the best.
|
||||
if (runp->ai_addr->sa_family == myfamily[i])
|
||||
#else
|
||||
/* sendto tests that there is a network to this
|
||||
address */
|
||||
if (runp->ai_addr->sa_family == myfamily[i] &&
|
||||
sendto(mysockets[i], NULL, 0, 0,
|
||||
runp->ai_addr, runp->ai_addrlen) == 0)
|
||||
#endif
|
||||
{
|
||||
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue