Fix building tinc and running tests on Solaris
[tinc] / src / address_cache.c
index df465da..a414f46 100644 (file)
@@ -32,7 +32,7 @@ static struct addrinfo *get_known_addresses(node_t *n) {
        struct addrinfo *ai = NULL;
        struct addrinfo *oai = NULL;
 
-       for splay_each(edge_t, e, n->edge_tree) {
+       for splay_each(edge_t, e, &n->edge_tree) {
                if(!e->reverse) {
                        continue;
                }
@@ -147,7 +147,7 @@ const sockaddr_t *get_recent_address(address_cache_t *cache) {
 
        // Otherwise, check if there are any known Address statements
        if(!cache->config_tree) {
-               init_configuration(&cache->config_tree);
+               cache->config_tree = create_configuration();
                read_host_config(cache->config_tree, cache->node->name, false);
                cache->cfg = lookup_config(cache->config_tree, "Address");
        }