Index: trunk/aclocal.m4
===================================================================
--- trunk/aclocal.m4	(revision 60)
+++ trunk/aclocal.m4	(revision 61)
@@ -1195,10 +1195,10 @@
 	#
 	if test "x$GCC" = xyes; then
-	  AC_MSG_CHECKING([for non-apple i386])
+	  AC_MSG_CHECKING([for non-apple non-cygwin i386])
 	  samhain_i386=no
           $CC -E -dM - < /dev/null | egrep '__i386__' >/dev/null 2>&1 
           if test $? = 0; then
             # apples gcc does not understand the assembly we provide
-            $CC -E -dM - < /dev/null | egrep '__APPLE__' >/dev/null 2>&1 || samhain_i386=yes
+            $CC -E -dM - < /dev/null | egrep '(__APPLE__|__CYGWIN__)' >/dev/null 2>&1 || samhain_i386=yes
           fi
 	  if test "x$samhain_i386" = xyes; then
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 60)
+++ trunk/configure.ac	(revision 61)
@@ -13,5 +13,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 2.2.4)
+AM_INIT_AUTOMAKE(samhain, 2.2.5)
 AC_CANONICAL_HOST
 
@@ -195,5 +195,5 @@
 
 AC_CHECK_HEADERS(stddef.h libgen.h sched.h \
-	sys/vfs.h \
+	sys/vfs.h mntent.h \
 	sys/select.h sys/socket.h netinet/in.h \
 	regex.h glob.h \
@@ -261,5 +261,5 @@
 	seteuid setreuid setresuid lstat getwd getcwd ptrace \
 	usleep setpriority getpeereid nanosleep \
-	strptime basename sched_yield \
+	strptime basename sched_yield hasmntopt \
 	inet_aton gethostbyname setutent setrlimit gethostname uname \
 	initgroups getpagesize \
Index: trunk/docs/BUGS
===================================================================
--- trunk/docs/BUGS	(revision 60)
+++ trunk/docs/BUGS	(revision 61)
@@ -1,2 +1,8 @@
+
+MacOS X:
+-------
+
+(1)  Pointed out by David: static linking is not supported on MacOS X,
+     see http://developer.apple.com/qa/qa2001/qa1118.html
 
 Solaris:
Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 60)
+++ trunk/docs/Changelog	(revision 61)
@@ -1,3 +1,8 @@
-2.2.4:
+2.2.5:
+	* workaround for glob(3) sillyness on MacOS X (reported by David)
+	* fix for broken resorce fork check (reported by David)
+	* fix for broken compilation on cygwin (reported by Elias)
+
+2.2.4 (03-09-2006):
 	* add regression test for the GrowingLogFiles issue to test suite
 	* fixed sh_unix.c: bug in database init if GrowingLogFiles used
Index: trunk/docs/FAQ.html
===================================================================
--- trunk/docs/FAQ.html	(revision 60)
+++ trunk/docs/FAQ.html	(revision 61)
@@ -129,5 +129,5 @@
 <br><center><h2>Rainer Wichmann</h2></center>
 <hr>
-<p><i>FAQ Revised: Tuesday 31 January 2006 21:28:35</i></p>
+<p><i>FAQ Revised: Monday 11 September 2006 22:18:54</i></p>
 <hr><h2>Table of Contents</h2>
 <dl>
@@ -150,4 +150,5 @@
 <li><a href="#Build and install7">2.8. ./install-sh: strip: not found (Solaris)</a></li>
 <li><a href="#Build and install8">2.9. What is sh_tiger1.s?</a></li>
+<li><a href="#Build and install9">2.10. Why does static compiling (<code>--enable-static</code>) on MaxOS X fail ?</a></li>
 </ul></dd>
 <dt><b>3. File checking</b></dt>
@@ -391,4 +392,8 @@
 it would be impossible to maintain a library of optimal compile options
 for every version of gcc.<br><br></dd>
+<dt><b><a name="Build and install9">2.10. Why does static compiling (<code>--enable-static</code>) on MaxOS X fail ?</a></b></dt>
+<dd>Static linking is not supported on MacOS X, see 
+<a href="http://developer.apple.com/qa/qa2001/qa1118.html">Technical Q&A QA1118</a>. 
+This is a MacOS X issue and not a bug in samhain.<br><br></dd>
 </dl>
 <hr><h2>3. File checking</h2>
Index: trunk/src/sh_files.c
===================================================================
--- trunk/src/sh_files.c	(revision 60)
+++ trunk/src/sh_files.c	(revision 61)
@@ -721,4 +721,9 @@
 
   SL_ENTER(_("sh_files_globerr"));
+
+  if (errnum == ENOTDIR || errnum == ENOENT)
+    {
+      SL_RETURN(0, _("sh_files_globerr"));
+    }
 
   p = sh_util_safe_name (epath);
@@ -2068,5 +2073,5 @@
       if (sl_strlen(testpath) == (17 + sl_strlen(fullpath)))
 	{
-	  if (0 == sh_unix_file_stat (testpath))
+	  if (0 != sh_unix_file_stat (testpath))
 	    {
 	      sh_files_filecheck (class, fullpath, rsrc, &dummy, 1);
Index: trunk/src/sh_suidchk.c
===================================================================
--- trunk/src/sh_suidchk.c	(revision 60)
+++ trunk/src/sh_suidchk.c	(revision 61)
@@ -521,5 +521,5 @@
 	       0 != strcmp(tmpcat, ShSuidchkExclude)))
 	    {
-	      /* fs is a STATIC string
+	      /* fs is a STATIC string or NULL
 	       */
 	      fs = filesystem_type (tmpcat, tmpcat, &buf);
@@ -1771,8 +1771,12 @@
 	  /* check for the "nosuid" option
 	   */
+#ifdef HAVE_HASMNTOPT
 	  if (NULL == hasmntopt(mnt, "nosuid"))
 	    type = mnt->mnt_type;
 	  else
-	    type = _("nosuid");
+	    type = _("nosuid"); /* hasmntopt (nosuid) */
+#else
+	  type = mnt->mnt_type;
+#endif
 	}
     }
