@@ -49,7 +49,7 @@ pub fn get_formatted_time() -> String {
49
49
/// # Returns
50
50
///
51
51
/// Returns a UResult with the uptime in seconds if successful, otherwise an UptimeError.
52
- #[ cfg( target_os ="openbsd" ) ]
52
+ #[ cfg( all ( target_os ="openbsd" , target_os = "redox" , target_os = "android" ) ) ]
53
53
pub fn get_uptime ( _boot_time : Option < time_t > ) ->UResult < i64 > {
54
54
use libc:: CLOCK_BOOTTIME ;
55
55
use libc:: clock_gettime;
@@ -88,7 +88,7 @@ pub fn get_uptime(_boot_time: Option<time_t>) -> UResult<i64> {
88
88
///
89
89
/// Returns a UResult with the uptime in seconds if successful, otherwise an UptimeError.
90
90
#[ cfg( unix) ]
91
- #[ cfg( not( target_os ="openbsd" ) ) ]
91
+ #[ cfg( not( any ( target_os ="openbsd" , target_os = "redox" , target_os = "android" ) ) ) ]
92
92
pub fn get_uptime ( boot_time : Option < time_t > ) ->UResult < i64 > {
93
93
use crate :: utmpx:: Utmpx ;
94
94
use libc:: BOOT_TIME ;
@@ -187,7 +187,7 @@ pub fn get_formatted_uptime(boot_time: Option<time_t>) -> UResult<String> {
187
187
///
188
188
/// Returns the number of users currently logged in if successful, otherwise 0.
189
189
#[ cfg( unix) ]
190
- #[ cfg( not( target_os ="openbsd" ) ) ]
190
+ #[ cfg( not( any ( target_os ="openbsd" , target_os = "redox" , target_os = "android" ) ) ) ]
191
191
// see: https://gitlab.com/procps-ng/procps/-/blob/4740a0efa79cade867cfc7b32955fe0f75bf5173/library/uptime.c#L63-L115
192
192
pub fn get_nusers ( ) ->usize {
193
193
use crate :: utmpx:: Utmpx ;
@@ -202,6 +202,12 @@ pub fn get_nusers() -> usize {
202
202
num_user
203
203
}
204
204
205
+ #[ cfg( all( target_os ="redox" , target_os ="android" ) ) ]
206
+ pub fn get_nusers ( ) ->usize {
207
+ // TODO implement
208
+ 0
209
+ }
210
+
205
211
/// Get the number of users currently logged in
206
212
///
207
213
/// # Returns