Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 376)
+++ /trunk/configure.ac	(revision 377)
@@ -12,5 +12,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 3.0.0)
+AM_INIT_AUTOMAKE(samhain, 3.0.0a)
 AC_DEFINE([SAMHAIN], 1, [Application is samhain])
 AC_CANONICAL_HOST
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 376)
+++ /trunk/docs/Changelog	(revision 377)
@@ -1,3 +1,6 @@
-3.0.0:
+3.0.0a:
+	* Fix compile-time issues on RHEL5 (reported by Thomas)
+
+3.0.0 (01-10-2011):
 	* Add support for the inotify API
 	* If --disable-shellexpand is used, also disable setting
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;
