$NetBSD: patch-bi,v 1.3 2014/11/30 08:40:51 spz Exp $
--- mono/metadata/filewatcher.c.orig	2014-09-22 13:23:09.000000000 +0000
+++ mono/metadata/filewatcher.c
@@ -45,9 +45,6 @@ static int (*FAMNextEvent) (gpointer, gp
 gint
 ves_icall_System_IO_FSW_SupportsFSW (void)
 {
-#if HAVE_KQUEUE
-	return 3;
-#else
 	MonoDl *fam_module;
 	int lib_used = 4; /* gamin */
 	int inotify_instance;
@@ -71,15 +68,22 @@ ves_icall_System_IO_FSW_SupportsFSW (voi
 	}
 
 	if (fam_module == NULL)
+#if HAVE_KQUEUE
+		return 3;
+#else
 		return 0;
+#endif
 
 	err = mono_dl_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
 	g_free (err);
 	if (FAMNextEvent == NULL)
+#if HAVE_KQUEUE
+		return 3;
+#else
 		return 0;
+#endif
 
 	return lib_used;
-#endif
 }
 
 /* Almost copied from fam.h. Weird, I know */
