diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-01 17:22:35 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-01 17:22:35 +0000 |
commit | da1f08cd9a6b2d4f2c5957f1b2484e3c20d044ba (patch) | |
tree | 7d55b9b343fd5e7944f265f253c4ca795ecbc84f /main/utils.c | |
parent | f6aab71cc9c0b6d795c24b37456d173dffc736e2 (diff) |
Extend autoconf logic to determine which version of gethostbyname_r is on the system.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77863 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/utils.c b/main/utils.c index 7d2418457..e85618048 100644 --- a/main/utils.c +++ b/main/utils.c @@ -67,7 +67,7 @@ static char b2a[256]; AST_THREADSTORAGE(inet_ntoa_buf, inet_ntoa_buf_init); -#if !defined(HAVE_GETHOSTBYNAME_R) +#if !defined(HAVE_GETHOSTBYNAME_R_5) && !defined(HAVE_GETHOSTBYNAME_R_6) #define ERANGE 34 /*!< duh? ERANGE value copied from web... */ #undef gethostbyname @@ -212,7 +212,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp) return NULL; } -#ifdef SOLARIS +#ifdef HAVE_GETHOSTBYNAME_R5 result = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &herrno); if (!result || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0]) |