File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ fn main() {
2222 // On CI, we detect the actual FreeBSD version and match its ABI exactly,
2323 // running tests to ensure that the ABI is correct.
2424 match which_freebsd ( ) {
25- Some ( 10 ) if libc_ci || rustc_dep_of_std => println ! ( "cargo:rustc-cfg=freebsd10" ) ,
25+ Some ( 10 ) if libc_ci || rustc_dep_of_std => {
26+ println ! ( "cargo:rustc-cfg=freebsd10" )
27+ }
2628 Some ( 11 ) if libc_ci => println ! ( "cargo:rustc-cfg=freebsd11" ) ,
2729 Some ( 12 ) if libc_ci => println ! ( "cargo:rustc-cfg=freebsd12" ) ,
2830 Some ( 13 ) if libc_ci => println ! ( "cargo:rustc-cfg=freebsd13" ) ,
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ s! {
104104 }
105105}
106106
107+ // FIXME: FreeBSD10 is only defined when building libstd
108+ // These types are not available in FreeBSD10 and
109+ // cfg'ing them out prevents them from being used from
110+ // libstd by accident.
107111#[ cfg( not( freebsd10) ) ]
108112s ! {
109113 pub struct mmsghdr {
@@ -310,10 +314,12 @@ cfg_if! {
310314 }
311315}
312316
317+ // FIXME: FreeBSD10 is only defined when building libstd
318+ // These constants are not available in FreeBSD10 and
319+ // cfg'ing them out prevents them from being used from
320+ // libstd by accident.
313321cfg_if ! {
314322 if #[ cfg( not( freebsd10) ) ] {
315- // These constants are not available in FreeBSD10
316- // This prevents them from being used from libstd:
317323 pub const SF_USER_READAHEAD : :: c_int = 0x00000008 ;
318324 pub const SF_NOCACHE : :: c_int = 0x00000010 ;
319325 pub const RLIMIT_KQUEUES : :: c_int = 13 ;
@@ -1143,6 +1149,10 @@ f! {
11431149 }
11441150}
11451151
1152+ // FIXME: FreeBSD10 is only defined when building libstd
1153+ // These functions are not available in FreeBSD10 and
1154+ // cfg'ing them out prevents them from being used from
1155+ // libstd by accident.
11461156#[ cfg( not( freebsd10) ) ]
11471157extern {
11481158 pub fn fdatasync ( fd : :: c_int ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments