Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/host_resolver_proc.h" | 5 #include "net/base/host_resolver_proc.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| 11 #include "net/base/dns_reloader.h" | 11 #include "net/base/dns_reloader.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/base/sys_addrinfo.h" | 13 #include "net/base/sys_addrinfo.h" |
| 14 | 14 |
| 15 #if defined(OS_OPENBSD) | |
| 16 #include <sys/types.h> | |
| 17 #define AI_ADDRCONFIG 0 | |
|
wtc
2011/10/18 21:50:26
With this AI_ADDRCONFIG macro definition, you shou
Robert Nagy
2011/10/19 07:10:02
Actually neither sys/types.h nor resolv.h is neede
| |
| 18 #endif | |
| 19 | |
| 15 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 20 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 16 #include <resolv.h> | 21 #include <resolv.h> |
| 17 #endif | 22 #endif |
| 18 | 23 |
| 19 namespace net { | 24 namespace net { |
| 20 | 25 |
| 21 namespace { | 26 namespace { |
| 22 | 27 |
| 23 bool IsAllLocalhostOfOneFamily(const struct addrinfo* ai) { | 28 bool IsAllLocalhostOfOneFamily(const struct addrinfo* ai) { |
| 24 bool saw_v4_localhost = false; | 29 bool saw_v4_localhost = false; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 #endif | 237 #endif |
| 233 | 238 |
| 234 return ERR_NAME_NOT_RESOLVED; | 239 return ERR_NAME_NOT_RESOLVED; |
| 235 } | 240 } |
| 236 | 241 |
| 237 *addrlist = AddressList::CreateByAdoptingFromSystem(ai); | 242 *addrlist = AddressList::CreateByAdoptingFromSystem(ai); |
| 238 return OK; | 243 return OK; |
| 239 } | 244 } |
| 240 | 245 |
| 241 } // namespace net | 246 } // namespace net |
| OLD | NEW |