Skip to content

Commit 6799925

Browse files
author
Al Hoang
committed
haiku: enable user
1 parent 90f3f88 commit 6799925

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/unistd.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,7 @@ pub struct User {
28772877
/// Login class
28782878
#[cfg(not(any(target_os = "android",
28792879
target_os = "fuchsia",
2880+
target_os = "haiku",
28802881
target_os = "illumos",
28812882
target_os = "linux",
28822883
target_os = "solaris")))]
@@ -2885,6 +2886,7 @@ pub struct User {
28852886
/// Last password change
28862887
#[cfg(not(any(target_os = "android",
28872888
target_os = "fuchsia",
2889+
target_os = "haiku",
28882890
target_os = "illumos",
28892891
target_os = "linux",
28902892
target_os = "solaris")))]
@@ -2893,14 +2895,15 @@ pub struct User {
28932895
/// Expiration time of account
28942896
#[cfg(not(any(target_os = "android",
28952897
target_os = "fuchsia",
2898+
target_os = "haiku",
28962899
target_os = "illumos",
28972900
target_os = "linux",
28982901
target_os = "solaris")))]
28992902
#[cfg_attr(docsrs, doc(cfg(all())))]
29002903
pub expire: libc::time_t
29012904
}
29022905

2903-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))] //RedoxFS does not support passwd
2906+
#[cfg(not(target_os = "redox"))] //RedoxFS does not support passwd
29042907
impl From<&libc::passwd> for User {
29052908
fn from(pw: &libc::passwd) -> User {
29062909
unsafe {
@@ -2915,18 +2918,21 @@ impl From<&libc::passwd> for User {
29152918
gid: Gid::from_raw((*pw).pw_gid),
29162919
#[cfg(not(any(target_os = "android",
29172920
target_os = "fuchsia",
2921+
target_os = "haiku",
29182922
target_os = "illumos",
29192923
target_os = "linux",
29202924
target_os = "solaris")))]
29212925
class: CString::new(CStr::from_ptr((*pw).pw_class).to_bytes()).unwrap(),
29222926
#[cfg(not(any(target_os = "android",
29232927
target_os = "fuchsia",
2928+
target_os = "haiku",
29242929
target_os = "illumos",
29252930
target_os = "linux",
29262931
target_os = "solaris")))]
29272932
change: (*pw).pw_change,
29282933
#[cfg(not(any(target_os = "android",
29292934
target_os = "fuchsia",
2935+
target_os = "haiku",
29302936
target_os = "illumos",
29312937
target_os = "linux",
29322938
target_os = "solaris")))]
@@ -2936,7 +2942,7 @@ impl From<&libc::passwd> for User {
29362942
}
29372943
}
29382944

2939-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))] // RedoxFS does not support passwd
2945+
#[cfg(not(target_os = "redox"))] // RedoxFS does not support passwd
29402946
impl From<User> for libc::passwd {
29412947
fn from(u: User) -> Self {
29422948
let name = match CString::new(u.name) {
@@ -2962,18 +2968,21 @@ impl From<User> for libc::passwd {
29622968
pw_gid: u.gid.0,
29632969
#[cfg(not(any(target_os = "android",
29642970
target_os = "fuchsia",
2971+
target_os = "haiku",
29652972
target_os = "illumos",
29662973
target_os = "linux",
29672974
target_os = "solaris")))]
29682975
pw_class: u.class.into_raw(),
29692976
#[cfg(not(any(target_os = "android",
29702977
target_os = "fuchsia",
2978+
target_os = "haiku",
29712979
target_os = "illumos",
29722980
target_os = "linux",
29732981
target_os = "solaris")))]
29742982
pw_change: u.change,
29752983
#[cfg(not(any(target_os = "android",
29762984
target_os = "fuchsia",
2985+
target_os = "haiku",
29772986
target_os = "illumos",
29782987
target_os = "linux",
29792988
target_os = "solaris")))]
@@ -2988,7 +2997,7 @@ impl From<User> for libc::passwd {
29882997
}
29892998
}
29902999

2991-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))] // RedoxFS does not support passwd
3000+
#[cfg(not(target_os = "redox"))] // RedoxFS does not support passwd
29923001
impl User {
29933002
fn from_anything<F>(f: F) -> Result<Option<Self>>
29943003
where

0 commit comments

Comments
 (0)