Checking the c-ares version, fix for c-ares >= 1.5.0.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 9 Nov 2009 16:40:57 +0000 (16:40 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 9 Nov 2009 16:40:57 +0000 (16:40 +0000)
org.glite.lb.server/src/bkserverd.c

index 78a0db5..5e912bc 100644 (file)
@@ -25,6 +25,7 @@
 #include <arpa/nameser.h>
 #include <resolv.h>
 #include <ares.h>
+#include <ares_version.h>
 #include <errno.h>
 
 #ifdef GLITE_LB_SERVER_WITH_WS
@@ -1582,7 +1583,11 @@ struct asyn_result {
 };
 
 /* ares callback handler for ares_gethostbyaddr()       */
+#if ARES_VERSION >= 0x010500
+static void callback_handler(void *arg, int status, int timeouts, struct hostent *h)
+#else
 static void callback_handler(void *arg, int status, struct hostent *h)
+#endif
 {
        struct asyn_result *arp = (struct asyn_result *) arg;