summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'sql/udf_example.c')
-rw-r--r--sql/udf_example.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 82af58ec502..637293209e0 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -141,7 +141,9 @@ typedef long long longlong;
#ifdef HAVE_DLOPEN
+#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
static pthread_mutex_t LOCK_hostname;
+#endif
/* These must be right or mysqld will not find the symbol! */