Skip to content

Commit 85eb0b3

Browse files
committed
changes from feedback
1 parent 9a963e8 commit 85eb0b3

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

library/std/build.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ use std::env;
33
fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
55
let target = env::var("TARGET").expect("TARGET was not set");
6-
if target.contains("freebsd") {
7-
println!("cargo:rustc-cfg=freebsd12");
8-
if env::var("RUST_STD_FREEBSD_13_ABI").is_ok() {
9-
println!("cargo:rustc-cfg=freebsd13");
10-
}
11-
} else if target.contains("linux")
6+
if target.contains("linux")
127
|| target.contains("netbsd")
138
|| target.contains("dragonfly")
149
|| target.contains("openbsd")

library/std/src/os/freebsd/fs.rs

-10
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,7 @@ impl MetadataExt for Metadata {
7676
fn as_raw_stat(&self) -> &raw::stat {
7777
// The methods below use libc::stat, so they work fine when libc is built with FreeBSD 12 ABI.
7878
// This method would just return nonsense.
79-
#[cfg(freebsd12)]
8079
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-
}
8580
}
8681
fn st_dev(&self) -> u64 {
8782
self.as_inner().as_inner().st_dev as u64
@@ -143,12 +138,7 @@ impl MetadataExt for Metadata {
143138
fn st_flags(&self) -> u32 {
144139
self.as_inner().as_inner().st_flags as u32
145140
}
146-
#[cfg(freebsd12)]
147141
fn st_lspare(&self) -> u32 {
148142
panic!("st_lspare not supported with FreeBSD 12 ABI");
149143
}
150-
#[cfg(not(freebsd12))]
151-
fn st_lspare(&self) -> u32 {
152-
self.as_inner().as_inner().st_lspare as u32
153-
}
154144
}

0 commit comments

Comments
 (0)