Dag-Erling Smørgrav <des_at_FreeBSD.org> wrote on Date: Wed, 10 Sep 2025 16:58:46 UTC :
> The branch main has been updated by des: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d549de769055ae6116601e54e4c86dfb3e17f4c4 > > commit d549de769055ae6116601e54e4c86dfb3e17f4c4 > Author: Dag-Erling Smørgrav <[email protected]> > AuthorDate: 2025-09-10 16:52:50 +0000 > Commit: Dag-Erling Smørgrav <[email protected]> > CommitDate: 2025-09-10 16:58:06 +0000 > > libc: Remove readdir_r(3) > > This function was never safe to use. We marked it deprecated in the > manual page in 2016, and it is marked obsolete in POSIX 2024. We > previously added a linker warning and annotated the prototype; now that > stable/15 has been branched, we can remove it from main. > > Relnotes: yes > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D52474 > --- > ObsoleteFiles.inc | 3 +++ > include/dirent.h | 4 ---- > lib/libc/gen/Makefile.inc | 1 - > lib/libc/gen/Symbol.map | 1 - > lib/libc/gen/directory.3 | 51 ++++------------------------------------- > lib/libc/gen/gen-compat.h | 1 + > lib/libc/gen/gen-private.h | 3 --- > lib/libc/gen/readdir-compat11.c | 2 +- > lib/libc/gen/readdir.c | 8 +++---- > 9 files changed, 13 insertions(+), 61 deletions(-) Example error message text from the log file for the rust build via poudriere-devel: = note: ld: error: undefined symbol: readdir_r >>> referenced by std.d8968a002452916e-cgu.07 >>> std-de94806a57729acc.std.d8968a002452916e-cgu.07.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hbe1160129d2c5f7c) in archive /wrkdirs/usr/ports/lan g/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-de94806a57729acc.rlib >>> did you mean: readdir_r@FBSD_1.5 >>> defined in: /lib/libc.so.7 cc: error: linker command failed with exit code 1 (use -v to see invocation) === Mark Millard marklmi at yahoo.com
