@@ -15,7 +15,7 @@ fn test_clocks() {
15
15
assert_eq ! ( is_error, 0 ) ;
16
16
let is_error = unsafe { libc:: clock_gettime ( libc:: CLOCK_MONOTONIC , tp. as_mut_ptr ( ) ) } ;
17
17
assert_eq ! ( is_error, 0 ) ;
18
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
18
+ #[ cfg( any( target_os = "linux" , target_os = "freebsd" , target_os = "android" ) ) ]
19
19
{
20
20
let is_error = unsafe { libc:: clock_gettime ( libc:: CLOCK_REALTIME_COARSE , tp. as_mut_ptr ( ) ) } ;
21
21
assert_eq ! ( is_error, 0 ) ;
@@ -63,9 +63,9 @@ fn test_localtime_r() {
63
63
tm_wday : 0 ,
64
64
tm_yday : 0 ,
65
65
tm_isdst : 0 ,
66
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
66
+ #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" , target_os = "android" ) ) ]
67
67
tm_gmtoff : 0 ,
68
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
68
+ #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" , target_os = "android" ) ) ]
69
69
tm_zone : std:: ptr:: null_mut :: < libc:: c_char > ( ) ,
70
70
} ;
71
71
let res = unsafe { libc:: localtime_r ( custom_time_ptr, & mut tm) } ;
@@ -79,9 +79,9 @@ fn test_localtime_r() {
79
79
assert_eq ! ( tm. tm_wday, 0 ) ;
80
80
assert_eq ! ( tm. tm_yday, 97 ) ;
81
81
assert_eq ! ( tm. tm_isdst, -1 ) ;
82
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
82
+ #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" , target_os = "android" ) ) ]
83
83
assert_eq ! ( tm. tm_gmtoff, 0 ) ;
84
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
84
+ #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" , target_os = "android" ) ) ]
85
85
unsafe {
86
86
assert_eq ! ( std:: ffi:: CStr :: from_ptr( tm. tm_zone) . to_str( ) . unwrap( ) , "+00" )
87
87
} ;
0 commit comments