HomeFreeBSD

Merge commit 4a39d0890894 from llvm-project (by Mark Johnston):

Description

Merge commit 4a39d0890894 from llvm-project (by Mark Johnston):

[libc++] Fix filesystem::remove_all() on FreeBSD (#79540)

remove_all_impl() opens the target path with O_NOFOLLOW, which fails if
the target is a symbolic link. On FreeBSD, rather than returning ELOOP,
openat() returns EMLINK. This is unlikely to change for compatibility
reasons, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214633 .

Thus, check for EMLINK as well.

Reported by: markj
PR: 276632
MFC after: 3 days

Details

Provenance
dimAuthored on Jan 29 2024, 5:26 PM
Parents
rG8d5353de7447: libc: Annotate a couple of local functions as such
Branches
Unknown
Tags
Unknown