@@ -42,7 +42,7 @@ fn test_posix_fadvise() {
42
42
assert_eq ! ( result, 0 ) ;
43
43
}
44
44
45
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
45
+ #[ cfg( any( target_os = "linux" ) ) ]
46
46
fn test_sync_file_range ( ) {
47
47
use std:: fs:: { remove_file, File } ;
48
48
use std:: io:: Write ;
@@ -208,7 +208,7 @@ fn test_rwlock_libc_static_initializer() {
208
208
/// Test whether the `prctl` shim correctly sets the thread name.
209
209
///
210
210
/// Note: `prctl` exists only on Linux.
211
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
211
+ #[ cfg( any( target_os = "linux" ) ) ]
212
212
fn test_prctl_thread_name ( ) {
213
213
use libc:: c_long;
214
214
use std:: ffi:: CString ;
@@ -259,9 +259,9 @@ fn test_prctl_thread_name() {
259
259
260
260
/// Tests whether each thread has its own `__errno_location`.
261
261
fn test_thread_local_errno ( ) {
262
- #[ cfg( not ( target_os = "macos" ) ) ]
262
+ #[ cfg( target_os = "linux" ) ]
263
263
use libc:: __errno_location;
264
- #[ cfg( target_os = "macos" ) ]
264
+ #[ cfg( any ( target_os = "macos" , target_os = "freebsd" ) ) ]
265
265
use libc:: __error as __errno_location;
266
266
267
267
unsafe {
@@ -278,7 +278,7 @@ fn test_thread_local_errno() {
278
278
}
279
279
280
280
/// Tests whether clock support exists at all
281
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
281
+ #[ cfg( any( target_os = "linux" ) ) ]
282
282
fn test_clocks ( ) {
283
283
let mut tp = std:: mem:: MaybeUninit :: < libc:: timespec > :: uninit ( ) ;
284
284
let is_error = unsafe { libc:: clock_gettime ( libc:: CLOCK_REALTIME , tp. as_mut_ptr ( ) ) } ;
@@ -317,22 +317,22 @@ fn main() {
317
317
318
318
test_posix_gettimeofday ( ) ;
319
319
320
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
320
+ #[ cfg( any( target_os = "linux" ) ) ]
321
321
test_sync_file_range ( ) ;
322
322
323
323
test_mutex_libc_init_recursive ( ) ;
324
324
test_mutex_libc_init_normal ( ) ;
325
325
test_mutex_libc_init_errorcheck ( ) ;
326
326
test_rwlock_libc_static_initializer ( ) ;
327
327
328
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
328
+ #[ cfg( any( target_os = "linux" ) ) ]
329
329
test_mutex_libc_static_initializer_recursive ( ) ;
330
330
331
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
331
+ #[ cfg( any( target_os = "linux" ) ) ]
332
332
test_prctl_thread_name ( ) ;
333
333
334
334
test_thread_local_errno ( ) ;
335
335
336
- #[ cfg( any( target_os = "linux" , target_os = "freebsd" ) ) ]
336
+ #[ cfg( any( target_os = "linux" ) ) ]
337
337
test_clocks ( ) ;
338
338
}
0 commit comments