File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ pub use backend::system::types::Sysinfo;
2020/// `uname()`—Returns high-level information about the runtime OS and
2121/// hardware.
2222///
23+ /// For `gethostname()`, use [`Uname::nodename`] on the result.
24+ ///
2325/// # References
2426/// - [POSIX]
2527/// - [Linux]
@@ -40,6 +42,7 @@ pub use backend::system::types::Sysinfo;
4042/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=uname§ion=3
4143/// [illumos]: https://illumos.org/man/2/uname
4244/// [glibc]: https://www.gnu.org/software/libc/manual/html_node/Platform-Type.html
45+ #[ doc( alias = "gethostname" ) ]
4346#[ inline]
4447pub fn uname ( ) -> Uname {
4548 Uname ( backend:: system:: syscalls:: uname ( ) )
@@ -61,6 +64,8 @@ impl Uname {
6164 /// This is intended to be a network name, however it's unable to convey
6265 /// information about hosts that have multiple names, or any information
6366 /// about where the names are visible.
67+ ///
68+ /// This corresponds to the `gethostname` value.
6469 #[ inline]
6570 pub fn nodename ( & self ) -> & CStr {
6671 Self :: to_cstr ( self . 0 . nodename . as_ptr ( ) . cast ( ) )
You can’t perform that action at this time.
0 commit comments