httpinfo: fix compile warning
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 8 Jun 2012 18:33:31 +0000 (20:33 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 9 Jun 2012 09:37:10 +0000 (11:37 +0200)
src/olsrd_httpinfo.c: In function 'build_ipaddr_link':
src/olsrd_httpinfo.c:745: error: passing argument 1 of 'gethostbyaddr' from incompatible pointer type
/home/ferry/android/android-ndk-r8/platforms/android-4/arch-arm/usr/include/netdb.h:204: note: expected 'const char *' but argument is of type 'const union olsr_ip_addr * const'

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/httpinfo/src/olsrd_httpinfo.c

index 456d533..5f9fa4f 100644 (file)
@@ -741,7 +741,7 @@ build_ipaddr_link(struct autobuf *abuf, const bool want_link, const union olsr_i
   struct ipaddr_str ipaddrstr;
   const struct hostent *const hp =
 #ifndef WIN32
-    resolve_ip_addresses ? gethostbyaddr(ipaddr, olsr_cnf->ipsize,
+    resolve_ip_addresses ? gethostbyaddr((const void *)ipaddr, olsr_cnf->ipsize,
                                          olsr_cnf->ip_version) :
 #endif
     NULL;