Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/native/libs/System.Native/pal_networkchange.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <errno.h>
#include <net/if.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/uio.h>
Expand Down Expand Up @@ -38,6 +39,9 @@ Error SystemNative_CreateNetworkChangeListenerSocket(intptr_t* retSocket)

#elif HAVE_RT_MSGHDR
int32_t sock = socket(PF_ROUTE, SOCK_RAW, 0);
#else
int32_t sock = -1;
errno = EAFNOSUPPORT;
#endif
if (sock == -1)
{
Expand Down Expand Up @@ -177,6 +181,6 @@ Error SystemNative_ReadEvents(intptr_t sock, NetworkChangeEvent onNetworkChange)
(void)onNetworkChange;
// unreachable
abort();
return Error_SUCCESS;
return Error_EINVAL;
}
#endif
11 changes: 11 additions & 0 deletions src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ int32_t SystemNative_GetDomainName(uint8_t* name, int32_t nameLength)
// Copy the domain name
SafeStringCopy((char*)name, namelen, uts.domainname);
return 0;
#elif defined(__HAIKU__)
// Haiku does not support NIS domains.
(void)nameLength;
*name = '\0';
return 0;
#else
// GetDomainName is not supported on this platform.
errno = ENOTSUP;
Expand Down Expand Up @@ -2140,10 +2145,13 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionLevel, int32_t socket

// case SocketOptionName_SO_TCP_BSDURGENT:

#ifdef TCP_KEEPCNT
case SocketOptionName_SO_TCP_KEEPALIVE_RETRYCOUNT:
*optName = TCP_KEEPCNT;
return true;
#endif

#if defined(TCP_KEEPALIVE) || defined(TCP_KEEPIDLE)
case SocketOptionName_SO_TCP_KEEPALIVE_TIME:
*optName =
#if HAVE_TCP_H_TCP_KEEPALIVE
Expand All @@ -2152,10 +2160,13 @@ static bool TryGetPlatformSocketOption(int32_t socketOptionLevel, int32_t socket
TCP_KEEPIDLE;
#endif
return true;
#endif

#ifdef TCP_KEEPINTVL
case SocketOptionName_SO_TCP_KEEPALIVE_INTERVAL:
*optName = TCP_KEEPINTVL;
return true;
#endif

#ifdef TCP_FASTOPEN
case SocketOptionName_SO_TCP_FASTOPEN:
Expand Down
Loading