File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ fn main() {
4141 let rustc_dep_of_std = env:: var ( "CARGO_FEATURE_RUSTC_DEP_OF_STD" ) . is_ok ( ) ;
4242 let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
4343 let libc_check_cfg = env:: var ( "LIBC_CHECK_CFG" ) . is_ok ( ) || rustc_minor_ver >= 80 ;
44+ let linux_time_bits64 = env:: var ( "RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64" ) . is_ok ( ) ;
4445
4546 // The ABI of libc used by std is backward compatible with FreeBSD 12.
4647 // The ABI of libc from crates.io is backward compatible with FreeBSD 12.
@@ -70,6 +71,10 @@ fn main() {
7071 Some ( _) | None => ( ) ,
7172 }
7273
74+ if linux_time_bits64 {
75+ set_cfg ( "linux_time_bits64" ) ;
76+ }
77+
7378 // On CI: deny all warnings
7479 if libc_ci {
7580 set_cfg ( "libc_deny_warnings" ) ;
Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ test_target() {
6565 $cmd --features const-extern-fn
6666 $cmd --features extra_traits
6767
68+ if [ " $os " = " linux" ]; then
69+ # Test with the equivalent of __USE_TIME_BITS64
70+ RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd
71+ fi
72+
6873 # Test again without default features, i.e. without "std"
6974 $cmd --no-default-features
7075 $cmd --no-default-features --features extra_traits
You can’t perform that action at this time.
0 commit comments