After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 435797 - gtksearchenginesimple doesn't build on non-glibc systems
gtksearchenginesimple doesn't build on non-glibc systems
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Reported: 2007-05-04 11:37 UTC by Richard Hult
Modified: 2007-05-14 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---

Additional check for GNU ftw (1.62 KB, patch)
2007-05-14 13:00 UTC, Richard Hult
none Details | Review
Check for GNU libc extensions to ftw (2.98 KB, patch)
2007-05-14 14:35 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Richard Hult 2007-05-04 11:37:21 UTC
As mentioned in bug #344785, the recently added searching code in the filechooser fails to build on non-glibc systems. The reason is that FTW_ACTIONRETVAL and friends are glibc specific, not POSIX.

See bug #157076 for a possible solution (add ftw()-like API to glib).
Comment 1 Matthias Clasen 2007-05-04 13:34:16 UTC
In the short term, you could just tighten the ftw check in configure to fail on those systems...
Comment 2 Richard Hult 2007-05-14 13:00:20 UTC
Created attachment 88155 [details] [review]
Additional check for GNU ftw

Something like this?

The patch checks for GNU ftw and use that define in the simple search enging code instead of HAVE_FTW_H. Still uses the old check for updateiconcache.
Comment 3 Emmanuele Bassi (:ebassi) 2007-05-14 13:09:15 UTC
the patch looks good to me.

in theory, we could still use ftw() without the FTW_ACTIONRETVAL with a time penalty on non-glibc systems.
Comment 4 Emmanuele Bassi (:ebassi) 2007-05-14 14:35:37 UTC
Created attachment 88159 [details] [review]
Check for GNU libc extensions to ftw

The patch adds a configure check for GNU extensions to ftw() and nftw()
and use the newly defined HAVE_GNU_FTW flag in GtkSearchEngineSimple. If
no extension is available, the code falls back to POSIX-compliant nftw().

Signed-off-by: Emmanuele Bassi <>
---                |   11 +++++++++++
 gtk/gtksearchenginesimple.c |   31 +++++++++++++++++++++++--------
 2 files changed, 34 insertions(+), 8 deletions(-)
Comment 5 Richard Hult 2007-05-14 15:24:01 UTC
Thanks, this builds nicely for me. It doesn't fully work but we can tweak that later, I'm happy it builds for now.
Comment 6 Emmanuele Bassi (:ebassi) 2007-05-14 15:34:36 UTC
2007-05-14  Emmanuele Bassi  <>

        * Add check for GNU extensions to ftw()/nftw().

        * gtk/gtksearchenginesimple.c: Fix compilation on systems with
        only POSIX-compliant ftw(). (#435797, based on a patch by
        Richard Hult)