mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed GeoIP not compiling on gcc
This commit is contained in:
parent
6486c56a15
commit
ce9728af93
@ -618,8 +618,6 @@ unsigned long _GeoIP_lookupaddress (const char *host) {
|
|||||||
struct hostent phe2;
|
struct hostent phe2;
|
||||||
struct hostent * phe = &phe2;
|
struct hostent * phe = &phe2;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
int buflength = 16384;
|
|
||||||
int herr = 0;
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
#ifdef HAVE_GETHOSTBYNAME_R
|
#ifdef HAVE_GETHOSTBYNAME_R
|
||||||
buf = malloc(buflength);
|
buf = malloc(buflength);
|
||||||
@ -930,7 +928,7 @@ char *_get_name (GeoIP* gi, unsigned long ipnum) {
|
|||||||
org_buf = malloc(len);
|
org_buf = malloc(len);
|
||||||
strncpy(org_buf, buf, len);
|
strncpy(org_buf, buf, len);
|
||||||
} else {
|
} else {
|
||||||
buf_pointer = gi->cache + (long)record_pointer;
|
buf_pointer = (char *)gi->cache + (long)record_pointer;
|
||||||
len = sizeof(char) * (strlen(buf_pointer)+1);
|
len = sizeof(char) * (strlen(buf_pointer)+1);
|
||||||
org_buf = malloc(len);
|
org_buf = malloc(len);
|
||||||
strncpy(org_buf, buf_pointer, len);
|
strncpy(org_buf, buf_pointer, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user