Skip to content

Commit

Permalink
Fix wchar build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
nickwilliams-zaxiom committed Sep 21, 2023
1 parent 4cc2425 commit 15e6f82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ACE/ace/INET_Addr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ ACE_INET_Addr::get_interface_name () const
void
ACE_INET_Addr::set_interface_name (const char * if_name)
{
int length (if_name == 0 ? 0 : strnlen (if_name, 52)); // stops counting at 52 if null byte not found by then
size_t length (if_name == 0 ? 0 : strnlen (if_name, 52)); // stops counting at 52 if null byte not found by then
if (length > 50)
{
// Interface names are usually just a few characters, Windows are the longest, as they are UUIDs
Expand Down
4 changes: 2 additions & 2 deletions ACE/ace/SOCK_Dgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr (ip_mreq *ret_mreq,
while (pAddrs && set_result == -1)
{
if (ACE_OS::strcmp (net_if_char, pAddrs->AdapterName) == 0 ||
ACE_OS::strcmp (ACE_TEXT_CHAR_TO_TCHAR (net_if_char), pAddrs->FriendlyName) == 0)
ACE_OS::strcmp (ACE_Ascii_To_Wide (net_if_char).wchar_rep (), pAddrs->FriendlyName) == 0)
{
PIP_ADAPTER_UNICAST_ADDRESS pUnicast = pAddrs->FirstUnicastAddress;
LPSOCKADDR sa = pUnicast->Address.lpSockaddr;
Expand Down Expand Up @@ -835,7 +835,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq,
else if ((num_if && pAddrs->Ipv6IfIndex == static_cast<unsigned int>(if_ix))
|| (!num_if &&
(ACE_OS::strcmp (net_if_char, pAddrs->AdapterName) == 0
|| ACE_OS::strcmp (ACE_TEXT_CHAR_TO_TCHAR (net_if_char), pAddrs->FriendlyName) == 0)))
|| ACE_OS::strcmp (ACE_Ascii_To_Wide (net_if_char).wchar_rep (), pAddrs->FriendlyName) == 0)))
{
lmreq.ipv6mr_interface = pAddrs->Ipv6IfIndex;
break;
Expand Down

0 comments on commit 15e6f82

Please sign in to comment.