@@ -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,19 @@ 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(
67
+ target_os = "linux" ,
68
+ target_os = "macos" ,
69
+ target_os = "freebsd" ,
70
+ target_os = "android"
71
+ ) ) ]
67
72
tm_gmtoff : 0 ,
68
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
73
+ #[ cfg( any(
74
+ target_os = "linux" ,
75
+ target_os = "macos" ,
76
+ target_os = "freebsd" ,
77
+ target_os = "android"
78
+ ) ) ]
69
79
tm_zone : std:: ptr:: null_mut :: < libc:: c_char > ( ) ,
70
80
} ;
71
81
let res = unsafe { libc:: localtime_r ( custom_time_ptr, & mut tm) } ;
@@ -79,9 +89,19 @@ fn test_localtime_r() {
79
89
assert_eq ! ( tm. tm_wday, 0 ) ;
80
90
assert_eq ! ( tm. tm_yday, 97 ) ;
81
91
assert_eq ! ( tm. tm_isdst, -1 ) ;
82
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
92
+ #[ cfg( any(
93
+ target_os = "linux" ,
94
+ target_os = "macos" ,
95
+ target_os = "freebsd" ,
96
+ target_os = "android"
97
+ ) ) ]
83
98
assert_eq ! ( tm. tm_gmtoff, 0 ) ;
84
- #[ cfg( any( target_os = "linux" , target_os = "macos" , target_os = "freebsd" ) ) ]
99
+ #[ cfg( any(
100
+ target_os = "linux" ,
101
+ target_os = "macos" ,
102
+ target_os = "freebsd" ,
103
+ target_os = "android"
104
+ ) ) ]
85
105
unsafe {
86
106
assert_eq ! ( std:: ffi:: CStr :: from_ptr( tm. tm_zone) . to_str( ) . unwrap( ) , "+00" )
87
107
} ;
0 commit comments