Skip to content

Commit e0918dc

Browse files
committed
fix issue1814
1 parent 1eb589f commit e0918dc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1010
([#1804](https://github.com/nix-rust/nix/pull/1804))
1111
- Added `line_discipline` field to `Termios` on Linux, Android and Haiku
1212
([#1805](https://github.com/nix-rust/nix/pull/1805))
13+
- Added `domainname` field of `UtsName` on Android and Linux
14+
([#1817](https://github.com/nix-rust/nix/pull/1817))
1315

1416
### Changed
1517

src/sys/utsname.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ impl UtsName {
3535
pub fn machine(&self) -> &OsStr {
3636
cast_and_trim(&self.0.machine)
3737
}
38+
39+
/// NIS or YP domain name of this machine.
40+
#[cfg(any(target_os = "android", target_os = "linux"))]
41+
pub fn domainname(&self) -> &OsStr {
42+
cast_and_trim(&self.0.domainname)
43+
}
3844
}
3945

4046
/// Get system identification

0 commit comments

Comments
 (0)