Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Sep 11, 2024
1 parent 3bbccad commit c6dc3da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,13 +966,13 @@ int32_t SystemNative_GetControlMessageBufferSize(int32_t isIPv4, int32_t isIPv6)
// Note: it is possible that the address family of the socket is neither
// AF_INET nor AF_INET6. In this case both inputs will be 0 and
// the control message buffer size should be zero.
#ifdef CMSG_SPACE
#if HAVE_CMSGHDR
return (isIPv4 != 0 ? CMSG_SPACE(sizeof(struct in_pktinfo)) : 0) + (isIPv6 != 0 ? CMSG_SPACE(sizeof(struct in6_pktinfo)) : 0);
#else // CMSG_SPACE
#else // HAVE_CMSGHDR
(void)isIPv4;
(void)isIPv6;
return 0;
#endif // CMSG_SPACE
#endif // HAVE_CMSGHDR
}

#if HAVE_CMSGHDR
Expand Down Expand Up @@ -3609,6 +3609,6 @@ uint32_t SystemNative_InterfaceNameToIndex(char* interfaceName)
return if_nametoindex(interfaceName);
#else // HAVE_NET_IF_H
(void)interfaceName;
return 0;
return Error_ENOTSUP;
#endif // HAVE_NET_IF_H
}

0 comments on commit c6dc3da

Please sign in to comment.