diff options
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c index 2914b8013..5c08f1372 100644 --- a/main/utils.c +++ b/main/utils.c @@ -204,6 +204,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp) if (dots != 3) return NULL; memset(hp, 0, sizeof(struct ast_hostent)); + hp->hp.h_addrtype = AF_INET; hp->hp.h_addr_list = (void *) hp->buf; hp->hp.h_addr = hp->buf + sizeof(void *); if (inet_pton(AF_INET, host, hp->hp.h_addr) > 0) |