about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-01-11 14:09:52 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-01-21 07:59:14 -0500
commitbc04a4eac47dcdc9feb3061dcc683e9d420227ab (patch)
tree1f3a8c664eabf2c22cfebad02552bc92a3e72363 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc3e92fec948f3875d1fa66d37c8e2599e6140215 (diff)
downloadrust-bc04a4eac47dcdc9feb3061dcc683e9d420227ab.tar.gz
rust-bc04a4eac47dcdc9feb3061dcc683e9d420227ab.zip
fs: Use readdir() instead of readdir_r() on Linux
readdir() is preferred over readdir_r() on Linux and many other
platforms because it more gracefully supports long file names.  Both
glibc and musl (and presumably all other Linux libc implementations)
guarantee that readdir() is thread-safe as long as a single DIR* is not
accessed concurrently, which is enough to make a readdir()-based
implementation of ReadDir safe.  This implementation is already used for
some other OSes including Fuchsia, Redox, and Solaris.

See #40021 for more details.  Fixes #86649.  Fixes #34668.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions