-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch Fuchsia to readdir (instead of readdir_r) #40024
Conversation
The readdir_r function is deprecated on newer Posix systems because of various problems, and not implemented at all for Fuchsia. There are already implementations using both, and this patch switches Fuchsia over to the readdir-based one. Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of what should happen for other Posix systems.
(rust_highfive has picked a reviewer for you, use r? to override) |
Note: this PR is dependent on rust-lang/libc#533 being merged. It will almost certainly cause build breakages until then. Also, as per discussion, I'd be happy for this change to be applied to other targets, in which case this PR is not sufficient. Hopefully, it's still useful, if for no other reason than to show what needs to change. Tested with recent Fuchsia, and also seems to build correctly on MacOS (the latter is not obvious because of the |
Looks good to me! I guess though we should hold off until rust-lang/libc#533 is merged? |
Update the implementation of name_bytes to use the owned string (which is thread safe). Also bump the src/liblibc submodule now that's merged.
@bors: r+ |
📌 Commit 81b9b3c has been approved by |
er, @bors: r- Looks like a merge conflict? |
I think I just need to git pull from master, will upload another version as soon as I locally confirm it works. |
@bors: r+ |
📌 Commit b3ee249 has been approved by |
Switch Fuchsia to readdir (instead of readdir_r) The readdir_r function is deprecated on newer Posix systems because of various problems, and not implemented at all for Fuchsia. There are already implementations using both, and this patch switches Fuchsia over to the readdir-based one. Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of what should happen for other Posix systems.
Switch Fuchsia to readdir (instead of readdir_r) The readdir_r function is deprecated on newer Posix systems because of various problems, and not implemented at all for Fuchsia. There are already implementations using both, and this patch switches Fuchsia over to the readdir-based one. Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of what should happen for other Posix systems.
Switch Fuchsia to readdir (instead of readdir_r) The readdir_r function is deprecated on newer Posix systems because of various problems, and not implemented at all for Fuchsia. There are already implementations using both, and this patch switches Fuchsia over to the readdir-based one. Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of what should happen for other Posix systems.
Rollup of 28 pull requests - Successful merges: #39859, #39864, #39888, #39903, #39905, #39914, #39945, #39950, #39953, #39961, #39980, #39988, #39993, #39995, #40019, #40020, #40022, #40024, #40025, #40026, #40027, #40031, #40035, #40037, #40038, #40064, #40069, #40086 - Failed merges: #39927, #40008, #40047
The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.
Fixes #40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.