--- operations.cpp.orig 2008-01-18 21:29:03.000000000 +0100 +++ operations.cpp 2008-01-18 21:29:30.000000000 +0100 @@ -1217,7 +1217,7 @@ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0) \ && (!defined(__HP_aCC) || (defined(__HP_aCC) && defined(_REENTRANT))) if ( ::sysconf( _SC_THREAD_SAFE_FUNCTIONS ) >= 0 ) - { return ::readdir_r( dirp, entry, result ); } + { if(::readdir_r( dirp, entry, result )==NULL) return errno; else return 0; } # endif struct dirent * p;