Don't try to call res_init() if ./configure told us it doesn't exist.
[tinc] / src / net_setup.c
index 121b989..863616b 100644 (file)
@@ -1,7 +1,7 @@
 /*
     net_setup.c -- Setup.
     Copyright (C) 1998-2005 Ivo Timmermans,
-                  2000-2014 Guus Sliepen <guus@tinc-vpn.org>
+                  2000-2015 Guus Sliepen <guus@tinc-vpn.org>
                   2006      Scott Lamb <slamb@slamb.org>
                   2010      Brandon Black <blblack@gmail.com>
 
@@ -813,7 +813,7 @@ static bool setup_myself(void) {
                        hint.ai_protocol = IPPROTO_TCP;
                        hint.ai_flags = AI_PASSIVE;
 
-#ifdef HAVE_DECL_RES_INIT
+#if HAVE_DECL_RES_INIT
                        // ensure glibc reloads /etc/resolv.conf.
                        res_init();
 #endif