Index: configure.in
===================================================================
--- configure.in	(revision 17843)
+++ configure.in	(working copy)
@@ -567,6 +567,15 @@ AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(H
 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
 AC_CHECK_HEADERS(ftw.h, AC_DEFINE(HAVE_FTW_H))
 
+AC_MSG_CHECKING([for GNU ftw])
+AC_TRY_COMPILE([#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
+if test $gtk_ok = yes; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(HAVE_GNU_FTW,1,[Have GNU ftw])
+else
+    AC_MSG_RESULT([no])
+fi
+
 saved_cflags="$CFLAGS"
 saved_ldflags="$LDFLAGS"
 
Index: gtk/gtksearchenginesimple.c
===================================================================
--- gtk/gtksearchenginesimple.c	(revision 17843)
+++ gtk/gtksearchenginesimple.c	(working copy)
@@ -31,7 +31,7 @@
 
 #include <string.h>
 
-#ifdef HAVE_FTW_H
+#ifdef HAVE_GNU_FTW
 #include <ftw.h>
 #endif
 
@@ -188,7 +188,7 @@ send_batch (SearchThreadData *data)
 
 static GStaticPrivate search_thread_data = G_STATIC_PRIVATE_INIT;
 
-#ifdef HAVE_FTW_H
+#ifdef HAVE_GNU_FTW
 static int
 search_visit_func (const char        *fpath,
 		   const struct stat *sb,
@@ -272,7 +272,7 @@ search_visit_func (const char        *fp
 static gpointer 
 search_thread_func (gpointer user_data)
 {
-#ifdef HAVE_FTW_H
+#ifdef HAVE_GNU_FTW
   SearchThreadData *data;
   
   data = user_data;
@@ -374,7 +374,7 @@ _gtk_search_engine_simple_init (GtkSearc
 GtkSearchEngine *
 _gtk_search_engine_simple_new (void)
 {
-#ifdef HAVE_FTW_H
+#ifdef HAVE_GNU_FTW
   return g_object_new (GTK_TYPE_SEARCH_ENGINE_SIMPLE, NULL);
 #else
   return NULL;
