Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 262)
+++ trunk/docs/Changelog	(revision 263)
@@ -3,4 +3,7 @@
 	* support event correlation in log monitoring module
 	* make sure host matching is done in a case insensitive way
+	  (reported by Tracy)
+	* fix invalid use of mutex_mlock in src/sh_unix.c, function 
+	  sh_unix_count_mlock() (reported by Remco Landegge).
 	
 2.6.0:
Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 262)
+++ trunk/src/sh_unix.c	(revision 263)
@@ -1555,5 +1555,5 @@
 #include <arpa/inet.h>
 
-char * sh_unix_h_name (struct hostent * host_entry)
+const char * sh_unix_h_name (struct hostent * host_entry)
 {
 	char ** p;
@@ -4859,7 +4859,9 @@
   SL_ENTER(_("sh_unix_count_mlock"));
 
+#if defined(HAVE_MLOCK) && !defined(HAVE_BROKEN_MLOCK)
   /* There's no cancellation point here, except if tracing is on
    */
   SH_MUTEX_LOCK_UNSAFE(mutex_mlock);
+#endif
 
   page_list = sh_page_locked;
@@ -4876,5 +4878,7 @@
     }
 
+#if defined(HAVE_MLOCK) && !defined(HAVE_BROKEN_MLOCK)
   SH_MUTEX_UNLOCK_UNSAFE(mutex_mlock);
+#endif
 
 #ifdef WITH_TPT
