We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a2dde1 commit a39a5f8Copy full SHA for a39a5f8
tests/run-pass/libc.rs
@@ -5,13 +5,14 @@
5
6
extern crate libc;
7
8
-use std::convert::TryInto;
9
-use std::env::temp_dir;
10
-use std::fs::{File, remove_file};
11
-use std::io::Write;
12
-use std::os::unix::io::AsRawFd;
+#[cfg(not(target_os = "macos"))]
+fn test_posix_fadvise() {
+ use std::convert::TryInto;
+ use std::env::temp_dir;
+ use std::fs::{File, remove_file};
13
+ use std::io::Write;
14
+ use std::os::unix::io::AsRawFd;
15
-fn main() {
16
let path = temp_dir().join("miri_test_libc.txt");
17
// Cleanup before test
18
remove_file(&path).ok();
@@ -34,3 +35,8 @@ fn main() {
34
35
remove_file(&path).unwrap();
36
assert_eq!(result, 0);
37
}
38
+
39
+fn main() {
40
+ #[cfg(not(target_os = "macos"))]
41
+ test_posix_fadvise();
42
+}
0 commit comments