1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 21:33:38 +00:00

added missing #ifdef

This commit is contained in:
Bryan Roe
2021-12-13 11:39:16 -08:00
parent 2da17d7c64
commit bcad1d475b

View File

@@ -6708,12 +6708,13 @@ SOCKET ILibGetSocket(struct sockaddr *localif, int type, int protocol)
SOCKET sock;
if (localif->sa_family == AF_INET6 && g_ILibDetectIPv6Support == 0) { ILIBMARKPOSITION(1); return -1; }
if ((sock = socket(localif->sa_family, type, protocol)) == -1) { ILIBMARKPOSITION(2); return -1; }
#ifdef _POSIX
if (sock == 0)
{
if ((sock = socket(localif->sa_family, type, protocol)) == -1) { ILIBMARKPOSITION(2); close(0); return -1; }
close(0);
}
#endif
#ifdef NACL
if (localif->sa_family == AF_INET6) if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&off, sizeof(off)) != 0) return -1;
#else