Fix warnings about using deprecated inet_ntoa function (#10698)

* Replaced inet_ntoa with inet_ntop.

The warning in question is: "Warning	C4996	'inet_ntoa': Use
inet_ntop() or InetNtop() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS"
This commit is contained in:
Justin Lewis 2021-08-17 23:16:38 -05:00 committed by GitHub
parent 705693ecf8
commit c13a46b07b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 12 deletions

View file

@ -277,10 +277,10 @@ const SceNpAvatarUrl& np_handler::get_avatar_url() const
std::string np_handler::ip_to_string(u32 ip_addr)
{
in_addr addr;
addr.s_addr = ip_addr;
char ip_str[16];
return inet_ntoa(addr);
inet_ntop(AF_INET, &ip_addr, ip_str, sizeof(ip_str));
return std::string(ip_str);
}
std::string np_handler::ether_to_string(std::array<u8, 6>& ether)