Skip to content
Snippets Groups Projects
Commit 3cf48e31 authored by Hanicef's avatar Hanicef
Browse files

Fix netcode on Haiku

parent 79dd5de6
No related branches found
No related tags found
No related merge requests found
...@@ -1211,11 +1211,16 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) ...@@ -1211,11 +1211,16 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
// test ip address of server // test ip address of server
for (i = 0; i < mysocketses; ++i) 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 /* sendto tests that there is a network to this
address */ address */
if (runp->ai_addr->sa_family == myfamily[i] && if (runp->ai_addr->sa_family == myfamily[i] &&
sendto(mysockets[i], NULL, 0, 0, sendto(mysockets[i], NULL, 0, 0,
runp->ai_addr, runp->ai_addrlen) == 0) runp->ai_addr, runp->ai_addrlen) == 0)
#endif
{ {
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen); memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment