diff options
| author | Tavian Barnes <tavianator@tavianator.com> | 2022-01-11 14:09:52 -0500 |
|---|---|---|
| committer | Tavian Barnes <tavianator@tavianator.com> | 2022-01-21 07:59:14 -0500 |
| commit | bc04a4eac47dcdc9feb3061dcc683e9d420227ab (patch) | |
| tree | 1f3a8c664eabf2c22cfebad02552bc92a3e72363 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | c3e92fec948f3875d1fa66d37c8e2599e6140215 (diff) | |
| download | rust-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
