summaryrefslogtreecommitdiff
path: root/mysys/my_gethostbyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_gethostbyname.c')
-rw-r--r--mysys/my_gethostbyname.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/my_gethostbyname.c b/mysys/my_gethostbyname.c
index 067fdfee9db..4b7e9054d61 100644
--- a/mysys/my_gethostbyname.c
+++ b/mysys/my_gethostbyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004 MySQL AB
+/* Copyright (C) 2002, 2004 MySQL AB, 2008-2009 Sun Microsystems, Inc
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -79,7 +79,7 @@ struct hostent *my_gethostbyname_r(const char *name,
#else /* !HAVE_GETHOSTBYNAME_R */
#ifdef THREAD
-extern pthread_mutex_t LOCK_gethostbyname_r;
+extern mysql_mutex_t LOCK_gethostbyname_r;
#endif
/*
@@ -96,7 +96,7 @@ struct hostent *my_gethostbyname_r(const char *name,
int buflen, int *h_errnop)
{
struct hostent *hp;
- pthread_mutex_lock(&LOCK_gethostbyname_r);
+ mysql_mutex_lock(&LOCK_gethostbyname_r);
hp= gethostbyname(name);
*h_errnop= h_errno;
return hp;
@@ -104,7 +104,7 @@ struct hostent *my_gethostbyname_r(const char *name,
void my_gethostbyname_r_free()
{
- pthread_mutex_unlock(&LOCK_gethostbyname_r);
+ mysql_mutex_unlock(&LOCK_gethostbyname_r);
}
#endif /* !HAVE_GETHOSTBYNAME_R */