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/dnsrr_resolver.h" | 5 #include "net/base/dnsrr_resolver.h" |
6 | 6 |
7 #if defined(OS_OPENBSD) | |
8 #include <netinet/in.h> | |
wtc
2011/10/18 21:50:26
Just add this to line 12 below.
Robert Nagy
2011/10/19 07:10:02
Done.
| |
9 #endif | |
10 | |
7 #if defined(OS_POSIX) | 11 #if defined(OS_POSIX) |
8 #include <resolv.h> | 12 #include <resolv.h> |
9 #endif | 13 #endif |
10 | 14 |
11 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
12 #include <windns.h> | 16 #include <windns.h> |
13 #endif | 17 #endif |
14 | 18 |
15 #include "base/location.h" | 19 #include "base/location.h" |
16 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 // Runs on a worker thread. | 184 // Runs on a worker thread. |
181 | 185 |
182 if (HandleTestCases()) { | 186 if (HandleTestCases()) { |
183 Finish(); | 187 Finish(); |
184 return; | 188 return; |
185 } | 189 } |
186 | 190 |
187 bool r = true; | 191 bool r = true; |
188 #if defined(OS_MACOSX) || defined(OS_OPENBSD) | 192 #if defined(OS_MACOSX) || defined(OS_OPENBSD) |
189 if ((_res.options & RES_INIT) == 0) { | 193 if ((_res.options & RES_INIT) == 0) { |
194 #if defined(OS_OPENBSD) | |
195 if (res_init() != 0) | |
196 #else | |
190 if (res_ninit(&_res) != 0) | 197 if (res_ninit(&_res) != 0) |
198 #endif | |
191 r = false; | 199 r = false; |
192 } | 200 } |
193 #else | 201 #else |
194 DnsReloaderMaybeReload(); | 202 DnsReloaderMaybeReload(); |
195 #endif | 203 #endif |
196 | 204 |
197 if (r) { | 205 if (r) { |
198 unsigned long saved_options = _res.options; | 206 unsigned long saved_options = _res.options; |
199 r = Do(); | 207 r = Do(); |
200 _res.options = saved_options; | 208 _res.options = saved_options; |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
667 inflight_.erase(j); | 675 inflight_.erase(j); |
668 | 676 |
669 job->HandleResult(result, response); | 677 job->HandleResult(result, response); |
670 delete job; | 678 delete job; |
671 } | 679 } |
672 | 680 |
673 } // namespace net | 681 } // namespace net |
674 | 682 |
675 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); | 683 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); |
676 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); | 684 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); |
OLD | NEW |