diff options
author | Mark Spencer <markster@digium.com> | 2004-04-28 19:55:04 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-04-28 19:55:04 +0000 |
commit | e6b464ed23f96373502449c4e1b2e3060980dc95 (patch) | |
tree | 14f98733fe9ae75b0bdd95731c44ad3a41e74ace /asterisk.c | |
parent | 33faf463a0154f2c9d534d624ae9a7a07768feeb (diff) |
More FreeBSD fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'asterisk.c')
-rwxr-xr-x | asterisk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/asterisk.c b/asterisk.c index 449c1ddcd..82ec83281 100755 --- a/asterisk.c +++ b/asterisk.c @@ -1702,8 +1702,8 @@ int gethostbyname_r (const char *name, int hsave; struct hostent *ph; - static pthread_mutex_t __mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&__mutex); /* begin critical area */ + static ast_mutex_t __mutex = AST_MUTEX_INITIALIZER; + ast_mutex_lock(&__mutex); /* begin critical area */ hsave = h_errno; ph = gethostbyname(name); @@ -1789,9 +1789,9 @@ int gethostbyname_r (const char *name, } h_errno = hsave; /* restore h_errno */ - pthread_mutex_unlock(&__mutex); /* end critical area */ + ast_mutex_unlock(&__mutex); /* end critical area */ - return (*result == NULL); + return (*result != NULL); } |