From ce9728af9362473f68906ae015e3e110bb587933 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 16 Aug 2008 23:20:07 +0000 Subject: [PATCH] Fixed GeoIP not compiling on gcc --- dlls/geoip/GeoIP.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/geoip/GeoIP.c b/dlls/geoip/GeoIP.c index 3a8ef661..4fcfd2e6 100755 --- a/dlls/geoip/GeoIP.c +++ b/dlls/geoip/GeoIP.c @@ -618,8 +618,6 @@ unsigned long _GeoIP_lookupaddress (const char *host) { struct hostent phe2; struct hostent * phe = &phe2; char *buf = NULL; - int buflength = 16384; - int herr = 0; int result = 0; #ifdef HAVE_GETHOSTBYNAME_R buf = malloc(buflength); @@ -930,7 +928,7 @@ char *_get_name (GeoIP* gi, unsigned long ipnum) { org_buf = malloc(len); strncpy(org_buf, buf, len); } else { - buf_pointer = gi->cache + (long)record_pointer; + buf_pointer = (char *)gi->cache + (long)record_pointer; len = sizeof(char) * (strlen(buf_pointer)+1); org_buf = malloc(len); strncpy(org_buf, buf_pointer, len);