aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/address_sorting/address_sorting.c
diff options
context:
space:
mode:
authorGravatar Alex Polcyn <apolcyn@google.com>2018-06-16 04:08:55 +0000
committerGravatar Alexander Polcyn <apolcyn@google.com>2018-07-25 13:21:43 -0700
commit1b1d5e52e7aa0ecdd455ad084aa7930ea89bbfd1 (patch)
treeb268e4cc4cd38ebd7554ab8020ed196bba1ba7af /third_party/address_sorting/address_sorting.c
parent3fd42677776ac03b2be4ebaf27e8fb0d4c589ac0 (diff)
Get c-ares to compile and do address sorting on windows
Diffstat (limited to 'third_party/address_sorting/address_sorting.c')
-rw-r--r--third_party/address_sorting/address_sorting.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/third_party/address_sorting/address_sorting.c b/third_party/address_sorting/address_sorting.c
index e4f3b53799..9aee0a5419 100644
--- a/third_party/address_sorting/address_sorting.c
+++ b/third_party/address_sorting/address_sorting.c
@@ -55,12 +55,17 @@ static const int kIPv6AddrScopeGlobal = 3;
static address_sorting_source_addr_factory* g_current_source_addr_factory =
NULL;
-static int address_sorting_get_source_addr(const address_sorting_address* dest,
- address_sorting_address* source) {
+static bool address_sorting_get_source_addr(const address_sorting_address* dest,
+ address_sorting_address* source) {
return g_current_source_addr_factory->vtable->get_source_addr(
g_current_source_addr_factory, dest, source);
}
+bool address_sorting_get_source_addr_for_testing(
+ const address_sorting_address* dest, address_sorting_address* source) {
+ return address_sorting_get_source_addr(dest, source);
+}
+
static int ipv6_prefix_match_length(const struct sockaddr_in6* sa,
const struct sockaddr_in6* sb) {
unsigned char* a = (unsigned char*)&sa->sin6_addr;