File tree 2 files changed +15
-3
lines changed
src/unix/bsd/freebsdlike/freebsd 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ fn main() {
22
22
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
23
23
// running tests to ensure that the ABI is correct.
24
24
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
+ }
26
28
Some ( 11 ) if libc_ci => println ! ( "cargo:rustc-cfg=freebsd11" ) ,
27
29
Some ( 12 ) if libc_ci => println ! ( "cargo:rustc-cfg=freebsd12" ) ,
28
30
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! {
104
104
}
105
105
}
106
106
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.
107
111
#[ cfg( not( freebsd10) ) ]
108
112
s ! {
109
113
pub struct mmsghdr {
@@ -310,10 +314,12 @@ cfg_if! {
310
314
}
311
315
}
312
316
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.
313
321
cfg_if ! {
314
322
if #[ cfg( not( freebsd10) ) ] {
315
- // These constants are not available in FreeBSD10
316
- // This prevents them from being used from libstd:
317
323
pub const SF_USER_READAHEAD : :: c_int = 0x00000008 ;
318
324
pub const SF_NOCACHE : :: c_int = 0x00000010 ;
319
325
pub const RLIMIT_KQUEUES : :: c_int = 13 ;
@@ -1143,6 +1149,10 @@ f! {
1143
1149
}
1144
1150
}
1145
1151
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.
1146
1156
#[ cfg( not( freebsd10) ) ]
1147
1157
extern {
1148
1158
pub fn fdatasync ( fd : :: c_int ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments