Network/Socket: Fix broadcast & dual-stack on Posix

This commit is contained in:
Lynix 2018-04-01 21:01:13 +02:00
parent eeba7f96a0
commit df510aeb78
1 changed files with 2 additions and 2 deletions

View File

@ -810,7 +810,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle");
int option = broadcasting;
if (setsockopt(handle, IPPROTO_IPV6, SO_BROADCAST, reinterpret_cast<const char*>(&option), sizeof(option)) == SOCKET_ERROR)
if (setsockopt(handle, SOL_SOCKET, SO_BROADCAST, reinterpret_cast<const char*>(&option), sizeof(option)) == SOCKET_ERROR)
{
if (error)
*error = TranslateErrnoToResolveError(GetLastErrorCode());
@ -829,7 +829,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle");
int option = ipv6Only;
if (setsockopt(handle, SOL_SOCKET, IPV6_V6ONLY, reinterpret_cast<const char*>(&option), sizeof(option)) == SOCKET_ERROR)
if (setsockopt(handle, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<const char*>(&option), sizeof(option)) == SOCKET_ERROR)
{
if (error)
*error = TranslateErrnoToResolveError(GetLastErrorCode());