-D_BSD_SOURCE doesn't work to use dirfd(), while man page says #include <sys/types.h> #include <sys/dir.h> are required, that causes another errors below In file included from thunar-vfs-scandir.c:41: /usr/include/dirent.h:56: error: conflicting types for 'DIR' /usr/include/sys/dir.h:100: error: previous declaration of 'DIR' was here /usr/include/dirent.h:63: error: conflicting types for 'BSDopendir' /usr/include/sys/dir.h:121: error: previous declaration of 'BSDopendir' was here /usr/include/dirent.h:64: error: conflicting types for 'BSDclosedir' /usr/include/sys/dir.h:125: error: previous declaration of 'BSDclosedir' was here /usr/include/dirent.h:65: error: conflicting types for 'BSDreaddir' /usr/include/sys/dir.h:122: error: previous declaration of 'BSDreaddir' was here /usr/include/dirent.h:66: error: syntax error before '(' token /usr/include/dirent.h:69: error: conflicting types for 'BSDtelldir' /usr/include/sys/dir.h:123: error: previous declaration of 'BSDtelldir' was here /usr/include/dirent.h:70: error: conflicting types for 'BSDseekdir' /usr/include/sys/dir.h:124: error: previous declaration of 'BSDseekdir' was here /usr/include/dirent.h:80: error: conflicting types for 'BSDscandir' /usr/include/sys/dir.h:127: error: previous declaration of 'BSDscandir' was here /usr/include/dirent.h:81: error: conflicting types for 'BSDalphasort' /usr/include/sys/dir.h:128: error: previous declaration of 'BSDalphasort' was here therefore, it needed (but of course this is wrong place to modify) In thunar-vfs-scandir.c at 40. #include <dirent.h> -> #include <sys/dirent.h> nonetheless, that brings an warning below thunar-vfs-scandir.c: In function 'thunar_vfs_scandir_collect_slow': thunar-vfs-scandir.c:292: warning: implicit declaration of function 'readdir_r' and compiled Thunar crashes at startup Thunar-ERROR **: file thunar-folder.c: line 546 (thunar_folder_get_for_file): assertion failed: (GTK_OBJECT_FLOATING (folder)) aborting... Trace/BPT/RangeErr/DivZero/Ovflow trap (core dumped) I'm not sure this crash is related to do directory scanning, but I can create another bug account if you want, and at first is there any way to detect dirfd() at configure process? I can show related header files (sys/dir.h, dirent.h, sys/dirent.h) to you. Reproducible: Always Steps to Reproduce: 1. 2. 3.
The crash on GTK_OBJECT_FLOATING() is a different issue (it looks like the macro is broken on IRIX for some reason, as GtkObject's are always created with an initial floating reference). Please open a separate bug report. Concerning dirfd(): As said earlier, we really need dirfd() for the generic scandir collector. If you could send me the header files, I could have a look at them.
Created attachment 347 Related header (1/4) /usr/include/dirent.h
Created attachment 348 Related header (2/4) /usr/include/sys/dirent.h
Created attachment 349 Related header (3/4) /usr/include/sys/types.h
Created attachment 350 Related header (4/4) /usr/include/sys/dir.h
Ok, looks like SGI introduced two incompatible APIs here. What we need is definetly <dirent.h> (which in turn includes <sys/dirent.h>), and this is incompatible with <sys/dir.h>. You could try to add #ifdef __sgi__ #define dirfd(dp) (((DIR *) dp)->__dd_fd) #endif to thunar-vfs-scandir.c, which should serve as a valid workaround. If that makes it work, i'll commit it.
Worked, now only startup crash is my problem, thanks.
Committed with revision 18976.