| Index: net/base/host_resolver_proc.cc
|
| diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc
|
| index e88fa2cef3a0b716d16cc11fa510a2c581e9f654..9360e87f6335d1b4166da2879e29d840a27ddce1 100644
|
| --- a/net/base/host_resolver_proc.cc
|
| +++ b/net/base/host_resolver_proc.cc
|
| @@ -7,6 +7,7 @@
|
| #include "build/build_config.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/sys_byteorder.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/dns_reloader.h"
|
| #include "net/base/net_errors.h"
|
| @@ -28,7 +29,8 @@ bool IsAllLocalhostOfOneFamily(const struct addrinfo* ai) {
|
| case AF_INET: {
|
| const struct sockaddr_in* addr_in =
|
| reinterpret_cast<struct sockaddr_in*>(ai->ai_addr);
|
| - if ((ntohl(addr_in->sin_addr.s_addr) & 0xff000000) == 0x7f000000)
|
| + if ((base::NetToHost32(addr_in->sin_addr.s_addr) & 0xff000000) ==
|
| + 0x7f000000)
|
| saw_v4_localhost = true;
|
| else
|
| return false;
|
|
|