Skip to content

Commit c6dc3da

Browse files
committed
more
1 parent 3bbccad commit c6dc3da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/native/libs/System.Native/pal_networking.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,13 +966,13 @@ int32_t SystemNative_GetControlMessageBufferSize(int32_t isIPv4, int32_t isIPv6)
966966
// Note: it is possible that the address family of the socket is neither
967967
// AF_INET nor AF_INET6. In this case both inputs will be 0 and
968968
// the control message buffer size should be zero.
969-
#ifdef CMSG_SPACE
969+
#if HAVE_CMSGHDR
970970
return (isIPv4 != 0 ? CMSG_SPACE(sizeof(struct in_pktinfo)) : 0) + (isIPv6 != 0 ? CMSG_SPACE(sizeof(struct in6_pktinfo)) : 0);
971-
#else // CMSG_SPACE
971+
#else // HAVE_CMSGHDR
972972
(void)isIPv4;
973973
(void)isIPv6;
974974
return 0;
975-
#endif // CMSG_SPACE
975+
#endif // HAVE_CMSGHDR
976976
}
977977

978978
#if HAVE_CMSGHDR
@@ -3609,6 +3609,6 @@ uint32_t SystemNative_InterfaceNameToIndex(char* interfaceName)
36093609
return if_nametoindex(interfaceName);
36103610
#else // HAVE_NET_IF_H
36113611
(void)interfaceName;
3612-
return 0;
3612+
return Error_ENOTSUP;
36133613
#endif // HAVE_NET_IF_H
36143614
}

0 commit comments

Comments
 (0)