[Thunar-dev] compilation error

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Sat Aug 6 18:15:19 CEST 2005


Jean-François Wauthy wrote:
> Hey benny
> 
> i just tried to compile lastest svn thunar and got that error: 
> 
> thunar-vfs-mime-cache.c: In function `thunar_vfs_mime_cache_new':
> thunar-vfs-mime-cache.c:487: warning: implicit declaration of function
> `posix_madvise'
> thunar-vfs-mime-cache.c:487: error: `POSIX_MADV_WILLNEED' undeclared
> (first use in this function)
> thunar-vfs-mime-cache.c:487: error: (Each undeclared identifier is
> reported only  once
> thunar-vfs-mime-cache.c:487: error: for each function it appears in.)
> make[1]: *** [libthunar_vfs_la-thunar-vfs-mime-cache.lo] Erreur 1
> make[1]: Leaving directory `/home/jf/Xfce/SVN/thunar/trunk/thunar-vfs'
> make: *** [all] Erreur 2
> 
> using the attached patch solved it but i don't know enough about posix
> functions to be sure it's correct...

madvise is not portable. posix_madvise must be used instead. 
posix_madvise, POSIX_MADV_NORMAL, POSIX_MADV_SEQUENTIAL, 
POSIX_MADV_RANDOM, POSIX_MADV_WILLNEED, and POSIX_MADV_DONTNEED must be 
declared in sys/mman.h.

Check your /usr/include/sys dir, maybe glibc uses non-standard location 
for the defines.

> cheers

greets,
Benedikt



More information about the Thunar-dev mailing list