2004-09-06 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / filewatcher.c
index 6210dc6b1f8b9add6610cf1a7dac8a4dd87992c3..731eb3a1ad2f043161f0a38fc011e21952edf2db 100644 (file)
@@ -89,21 +89,26 @@ static int (*FAMNextEvent) (gpointer, gpointer);
 gint
 ves_icall_System_IO_FSW_SupportsFSW (void)
 {
+#if HAVE_KQUEUE
+       return 3;
+#else
        GModule *fam_module;
+       gchar *filename;
 
        MONO_ARCH_SAVE_REGS;
 
-       fam_module = g_module_open ("libfam", G_MODULE_BIND_LAZY);
-       if (fam_module == NULL) {
+       filename = g_module_build_path (NULL, "libfam.so.0");
+       fam_module = g_module_open (filename, G_MODULE_BIND_LAZY);
+       g_free (filename);
+       if (fam_module == NULL)
                return 0;
-       }
 
-       
        g_module_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
        if (FAMNextEvent == NULL)
                return 0;
 
        return 2;
+#endif
 }
 
 gpointer