File tree 2 files changed +2
-18
lines changed
2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,11 @@ use std::env;
3
3
fn main ( ) {
4
4
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
5
5
let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
6
- if target. contains ( "freebsd" ) {
7
- if env:: var ( "RUST_STD_FREEBSD_12_ABI" ) . is_ok ( ) {
8
- println ! ( "cargo:rustc-cfg=freebsd12" ) ;
9
- } else if env:: var ( "RUST_STD_FREEBSD_13_ABI" ) . is_ok ( ) {
10
- println ! ( "cargo:rustc-cfg=freebsd12" ) ;
11
- println ! ( "cargo:rustc-cfg=freebsd13" ) ;
12
- }
13
- } else if target. contains ( "linux" )
6
+ if target. contains ( "linux" )
14
7
|| target. contains ( "netbsd" )
15
8
|| target. contains ( "dragonfly" )
16
9
|| target. contains ( "openbsd" )
10
+ || target. contains ( "freebsd" )
17
11
|| target. contains ( "solaris" )
18
12
|| target. contains ( "illumos" )
19
13
|| target. contains ( "apple-darwin" )
Original file line number Diff line number Diff line change @@ -76,12 +76,7 @@ impl MetadataExt for Metadata {
76
76
fn as_raw_stat ( & self ) -> & raw:: stat {
77
77
// The methods below use libc::stat, so they work fine when libc is built with FreeBSD 12 ABI.
78
78
// This method would just return nonsense.
79
- #[ cfg( freebsd12) ]
80
79
panic ! ( "as_raw_stat not supported with FreeBSD 12 ABI" ) ;
81
- #[ cfg( not( freebsd12) ) ]
82
- unsafe {
83
- & * ( self . as_inner ( ) . as_inner ( ) as * const libc:: stat as * const raw:: stat )
84
- }
85
80
}
86
81
fn st_dev ( & self ) -> u64 {
87
82
self . as_inner ( ) . as_inner ( ) . st_dev as u64
@@ -143,12 +138,7 @@ impl MetadataExt for Metadata {
143
138
fn st_flags ( & self ) -> u32 {
144
139
self . as_inner ( ) . as_inner ( ) . st_flags as u32
145
140
}
146
- #[ cfg( freebsd12) ]
147
141
fn st_lspare ( & self ) -> u32 {
148
142
panic ! ( "st_lspare not supported with FreeBSD 12 ABI" ) ;
149
143
}
150
- #[ cfg( not( freebsd12) ) ]
151
- fn st_lspare ( & self ) -> u32 {
152
- self . as_inner ( ) . as_inner ( ) . st_lspare as u32
153
- }
154
144
}
You can’t perform that action at this time.
0 commit comments