Geoip: Fix compilation #4.
This commit is contained in:
parent
6916eb8613
commit
9d59de41a2
|
@ -51,7 +51,7 @@
|
|||
#ifdef MMDB_DEBUG
|
||||
DEBUG_FUNC char *byte_to_binary(uint8_t byte)
|
||||
{
|
||||
char *bits = malloc(sizeof(char) * 9);
|
||||
char *bits = (char *)malloc(sizeof(char) * 9);
|
||||
if (NULL == bits) {
|
||||
return bits;
|
||||
}
|
||||
|
@ -611,6 +611,8 @@ MMDB_lookup_result_s MMDB_lookup_string(MMDB_s *const mmdb,
|
|||
LOCAL int resolve_any_address(const char *ipstr, struct addrinfo **addresses)
|
||||
{
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(addrinfo)); // getaddrinfo doesn't like garbage.
|
||||
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
int gai_status;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user