--- libs/filesystem/src/operations.cpp.orig 2007-11-19 15:57:20.000000000 -0500 +++ libs/filesystem/src/operations.cpp 2007-11-19 16:04:27.000000000 -0500 @@ -16,11 +16,6 @@ #define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this -// enable the XPG-compliant version of readdir_r() on AIX -#if defined(_AIX) -# define _LINUX_SOURCE_COMPAT -#endif - #if !(defined(__HP_aCC) && defined(_ILP32) && \ !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) #define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, @@ -1292,7 +1287,8 @@ && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \ && defined(_SC_THREAD_SAFE_FUNCTIONS) \ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0) \ - && (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT))) + && (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT))) \ + && (defined(_AIX) && defined(__THREAD_SAFE)) if ( ::sysconf( _SC_THREAD_SAFE_FUNCTIONS ) >= 0 ) { return ::readdir_r( dirp, entry, result ); } # endif