-
Jon Olav Hauglid authored
Backport from trunk to 5.7 of: Bug#23708395: GLIBC 2.24 DEPRECATES READDIR_R() BREAKING DEBUG BUILD OF MYSQL SERVER As of glibc 2.24, readdir_r() has been deprecated. This breaks our debug builds since the deprecation warning is upgraded to an error during compilation. This patch fixes the problem by removing use of readdir_r() and using readdir() instead. This is thread safe as long as readdir() is only used concurrently on different DIR* - which it is in our case. POSIX quote: "The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream. This data is not overwritten by another call to readdir() on a different directory stream." Change-Id: I85a6f5da2d48c8d5a9804cd6281411d9e757f46c (cherry picked from commit ba5245e9fef2257d60213076598268f544ca7109) (cherry picked from commit 865c124d1bdfd4eeee5eb42ea9faa9c8b45bfbb0)
Jon Olav Hauglid authoredBackport from trunk to 5.7 of: Bug#23708395: GLIBC 2.24 DEPRECATES READDIR_R() BREAKING DEBUG BUILD OF MYSQL SERVER As of glibc 2.24, readdir_r() has been deprecated. This breaks our debug builds since the deprecation warning is upgraded to an error during compilation. This patch fixes the problem by removing use of readdir_r() and using readdir() instead. This is thread safe as long as readdir() is only used concurrently on different DIR* - which it is in our case. POSIX quote: "The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream. This data is not overwritten by another call to readdir() on a different directory stream." Change-Id: I85a6f5da2d48c8d5a9804cd6281411d9e757f46c (cherry picked from commit ba5245e9fef2257d60213076598268f544ca7109) (cherry picked from commit 865c124d1bdfd4eeee5eb42ea9faa9c8b45bfbb0)
Loading