$NetBSD: patch-ad,v 1.2 2006/02/16 21:22:52 joerg Exp $

--- indexer/medusa-file-index-daemon.c.orig	Fri Apr 27 02:55:43 2001
+++ indexer/medusa-file-index-daemon.c
@@ -33,19 +33,26 @@
 #include <libgnomevfs/gnome-vfs-types.h>
 #include <libgnomevfs/gnome-vfs-uri.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
-#include <popt.h>
+#include <popt-gnome.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/resource.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
+#endif
 
 #ifdef HAVE_STATVFS
 #include <sys/statvfs.h>
 #elif defined(HAVE_STATFS)
+#ifdef HAVE_STATFS_H
 #include <sys/statfs.h>
+#else
+#include <sys/param.h>
+#include <sys/mount.h>
+#endif /* HAVE_STATFS_H */
 #endif /* HAVE_STATVFS */
 
 #include <time.h>
@@ -87,7 +94,6 @@ static void             exit_indexer    
 
 
 
-extern int errno;
 static gboolean create_index_even_if_disk_is_full;
 
 /* Main index loop.  
