about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-29 21:42:41 +0200
committerGitHub <noreply@github.com>2025-09-29 21:42:41 +0200
commit8223831942e7668d890955a1a67a69e49c286e3d (patch)
tree860929ee335a55911e0d954e8744de4b7e71b597 /compiler/rustc_codegen_llvm/src
parentdc2c3564d273cf8ccce32dc4f47eaa27063bceb9 (diff)
parent97333f8c9a0f774cc8d0025bbc51848e1f60427d (diff)
downloadrust-8223831942e7668d890955a1a67a69e49c286e3d.tar.gz
rust-8223831942e7668d890955a1a67a69e49c286e3d.zip
Rollup merge of #146937 - joboet:gethostname, r=Mark-Simulacrum
std: implement `hostname`

Resolves https://github.com/rust-lang/libs-team/issues/330
Tracking issue: https://github.com/rust-lang/rust/issues/135142

This is based on rust-lang/rust#135141, but I've reimplemented the UNIX version, which now:
* uses `sysconf(_SC_HOST_NAME_MAX)` as an initial buffer length
* returns `OutOfMemory` if the `Vec` allocation fails
* retries the operation if it detects that the name returned by `gethostname` was truncated

Additionally, as part of the rebase, I had to move some WinSock abstractions (initialisation and error access) to `sys::pal` so that they can be accessed from `sys::net::hostname`.

CC ``@orowith2os`` (and thank you for your work!)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions