You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"readdir_r" deprecated in newer glibc versions #1055
The patch doesn't include thread handling at the moment (readdir is not threadsafe), which could be a problem if we use the function in two threads at the same time... do we?
Would it be worth using readdir_r where available (via configure) and only switching back to readdir on machines where the former has been deprecated, or is that overly complex?
@daveol put in a warnings skipping based fix as an interim workaround to this in #1168 . We'll still need to fix this properly for when readdir_r gets removed.
Activity
peternewman commentedon Mar 1, 2016
This seems like it might address why:
https://womble.decadent.org.uk/readdir_r-advisory.html
The patch explicitly says "It is recommended to use readdir and readdir64 instead."
nomis52 commentedon Mar 2, 2016
Switching to readdir() is a step backwards.
I'd prefer that we use dirfd() to determine the size of the buffer for readdir_r().
I've confirmed dirfd() is available on Mac & linux.
daveol commentedon Mar 2, 2016
Okay, but that doesn't take away that readdir_r() is deprecated in the newer versions of glibc and will probably be removed in the future.
I see only one option, switching back to readdir()
nomis52 commentedon Mar 2, 2016
Hmm, ok I'm sold. I'll look at the patch later today..
daveol commentedon Mar 2, 2016
The patch doesn't include thread handling at the moment (readdir is not threadsafe), which could be a problem if we use the function in two threads at the same time... do we?
peternewman commentedon Mar 9, 2016
Would it be worth using readdir_r where available (via configure) and only switching back to readdir on machines where the former has been deprecated, or is that overly complex?
peternewman commentedon Sep 1, 2016
We're getting other users hitting this in the wild now http://text.michd.me/isiqejojof.mel . @loansindi .
peternewman commentedon Dec 7, 2016
More issues:
https://groups.google.com/forum/#!topic/open-lighting/GYt4Ne3qQzM
daveol commentedon Dec 10, 2016
I now have written a different approach to a fix for this, it is however of very temporary nature. you can find that fix in PR #1167
peternewman commentedon Mar 5, 2017
@daveol put in a warnings skipping based fix as an interim workaround to this in #1168 . We'll still need to fix this properly for when readdir_r gets removed.
kripton commentedon May 8, 2020
There's a pretty good explanation on http://man7.org/linux/man-pages/man3/readdir_r.3.html now.
So I'd say that going back to
readdirmight not be a step backwards.Replace readdir_r with readdir. Fixes OpenLightingProject#1055
Replace readdir_r with readdir. Fixes OpenLightingProject#1055