Skip to content

Commit

Permalink
Merge pull request #82 from kulikjak/add-solaris-support
Browse files Browse the repository at this point in the history
add support for Solaris
  • Loading branch information
sylvestre authored Sep 19, 2024
2 parents c739331 + f76ef8c commit cdf0d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/lib_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const HOST_OS_NAME: &str = if cfg!(all(
"Redox"
} else if cfg!(target_os = "illumos") {
"illumos"
} else if cfg!(target_os = "solaris") {
"solaris"
} else {
"unknown"
};
Expand Down
6 changes: 4 additions & 2 deletions src/platform/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ impl Debug for UTSName {
.field("version", &oss_from_cstr(&self.0.version))
.field("machine", &oss_from_cstr(&self.0.machine));
// The domainname field is not part of the POSIX standard but a GNU extension. Therefor
// BSD-like platforms and illumos are missing the domainname field.
// BSD-like platforms and solaris/illumos are missing the domainname field.
#[cfg(not(any(
target_os = "aix",
target_os = "illumos",
target_os = "solaris",
target_os = "macos",
target_os = "dragonfly",
target_os = "freebsd",
Expand Down Expand Up @@ -151,10 +152,11 @@ impl PartialEq for UTSName {
other.0.machine,
);
// The domainname field is not part of the POSIX standard but a GNU extension. Therefor
// BSD-like platforms and illumos are missing the domainname field.
// BSD-like platforms and solaris/illumos are missing the domainname field.
#[cfg(not(any(
target_os = "aix",
target_os = "illumos",
target_os = "solaris",
target_os = "macos",
target_os = "dragonfly",
target_os = "freebsd",
Expand Down

0 comments on commit cdf0d7a

Please sign in to comment.