X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;fp=src%2Fnet.c;h=fd79fdc7ed84ee59233fbac74096e166287fd552;hp=392aa7acbe79084e32210c4e37485906b00854f2;hb=745a5d0d3eae05f8aa94b7948ee4c796accbb09c;hpb=f6543e4da4a4f313ded43b84d572f21acacfcee7 diff --git a/src/net.c b/src/net.c index 392aa7ac..fd79fdc7 100644 --- a/src/net.c +++ b/src/net.c @@ -40,7 +40,10 @@ #include "route.h" #include "subnet.h" #include "xalloc.h" -#include "resolv.h" + +#ifdef HAVE_RESOLV_H +#include +#endif bool do_purge = false; volatile bool running = false; @@ -495,7 +498,9 @@ int main_loop(void) { avl_node_t *node; logger(LOG_INFO, "Flushing event queue"); expire_events(); +#ifdef HAVE_DECL_RES_INIT res_init(); +#endif for(node = connection_tree->head; node; node = node->next) { connection_t *c = node->data; if(c->status.active)