mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
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:
parent
705693ecf8
commit
c13a46b07b
3 changed files with 36 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue