Matthias Krüger e4e4829579
Rollup merge of #146269 - weihanglo:solaris-flock, r=Mark-Simulacrum
feat(std): emulate flock for solaris via fcntl

Upstream Solaris flock emulation to libstd from cargo.

This is borrowed from
3b379fcc54/src/cargo/util/flock.rs (L502-L536) which was implemented by an Oracle employee.
The code has been in cargo since 2022-12.

Python's `fcntl.flock` emulates like this as well: c919d02ede/Modules/fcntlmodule.c (L337-L400)

We did the same thing in
0d0f4eac8b/compiler/rustc_data_structures/src/flock/unix.rs (L13-L39)

However, should we just always falls back to fcntl for all Unix, instead of "unsupported"?

try-job: `*-solaris`
2025-09-07 20:02:28 +02:00
..
2025-09-05 17:01:07 -07:00