readdir_r is a thread safe function which allows you to
access the file system's directory structure. But the
dirent struct may differ among distributions. This may
be causing problems on Solaris.
This patch makes an interesting assumption that a save buffer
may be needed not just for the dirent, but also for the file name
itself, which may follow the dirent. This may even be true, and
certainly as written would seem to have no ill effect on things that
may have worked correctly before. I will take this in for testing
for 1.1.7. It will also change the binary signature (sizeof) for Dir
on targets that do have readdir_r.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Patch to fix an incorrect usage of readdir_r method on Solaris
Logged In: YES
user_id=217
This patch makes an interesting assumption that a save buffer
may be needed not just for the dirent, but also for the file name
itself, which may follow the dirent. This may even be true, and
certainly as written would seem to have no ill effect on things that
may have worked correctly before. I will take this in for testing
for 1.1.7. It will also change the binary signature (sizeof) for Dir
on targets that do have readdir_r.