Skip to content

Commit

Permalink
fix issue1814
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Sep 11, 2022
1 parent 1eb589f commit e0918dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
([#1804](https://github.com/nix-rust/nix/pull/1804))
- Added `line_discipline` field to `Termios` on Linux, Android and Haiku
([#1805](https://github.com/nix-rust/nix/pull/1805))
- Added `domainname` field of `UtsName` on Android and Linux
([#1817](https://github.com/nix-rust/nix/pull/1817))

### Changed

Expand Down
6 changes: 6 additions & 0 deletions src/sys/utsname.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ impl UtsName {
pub fn machine(&self) -> &OsStr {
cast_and_trim(&self.0.machine)
}

/// NIS or YP domain name of this machine.
#[cfg(any(target_os = "android", target_os = "linux"))]
pub fn domainname(&self) -> &OsStr {
cast_and_trim(&self.0.domainname)
}
}

/// Get system identification
Expand Down

0 comments on commit e0918dc

Please sign in to comment.