Index: trunk/src/sh_files.c
===================================================================
--- trunk/src/sh_files.c	(revision 376)
+++ trunk/src/sh_files.c	(revision 377)
@@ -19,4 +19,8 @@
 
 #include "config_xor.h"
+
+#if defined(HAVE_PTHREAD_MUTEX_RECURSIVE)
+#define _XOPEN_SOURCE 500
+#endif
 
 #include <stdio.h>
@@ -1455,4 +1459,5 @@
     }
  out:
+  ; /* 'label at end of compound statement' */
   SH_MUTEX_RECURSIVE_UNLOCK(mutex_zdirs);
 
@@ -1881,5 +1886,5 @@
   int             rdepth = 0;
   int             class  = 0;
-  int             rdepth_next;
+  volatile int    rdepth_next;
   int             class_next;
   volatile int    file_class_next;
@@ -2727,4 +2732,5 @@
 #endif
  out:
+  ; /* 'label at end of compound statement' */
   SH_MUTEX_RECURSIVE_UNLOCK(mutex_zdirs);
   return retval;
@@ -2774,4 +2780,5 @@
 #endif
  out:
+  ; /* 'label at end of compound statement' */
   SH_MUTEX_UNLOCK(mutex_zfiles);
   return retval;
Index: trunk/src/sh_inotify.c
===================================================================
--- trunk/src/sh_inotify.c	(revision 376)
+++ trunk/src/sh_inotify.c	(revision 377)
@@ -666,4 +666,5 @@
     }
  retpoint:
+  ; /* 'label at end of compound statement' */
   SH_MUTEX_UNLOCK(mutex_watches);
   return retval;
