From f76ef8cc789f522db3f89275b15de48b5e2843dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Thu, 19 Sep 2024 15:39:34 +0200 Subject: [PATCH] add support for Solaris --- src/lib_impl.rs | 2 ++ src/platform/unix.rs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib_impl.rs b/src/lib_impl.rs index 6dd4079..f147aee 100644 --- a/src/lib_impl.rs +++ b/src/lib_impl.rs @@ -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" }; diff --git a/src/platform/unix.rs b/src/platform/unix.rs index 55c96c4..e940127 100644 --- a/src/platform/unix.rs +++ b/src/platform/unix.rs @@ -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", @@ -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",