Skip to content

Commit f868322

Browse files
committed
Solaris does not have flock
1 parent e2c8ae9 commit f868322

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/tools/miri/src/shims/unix/foreign_items.rs

+2
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
231231
this.write_scalar(result, dest)?;
232232
}
233233
"flock" => {
234+
// Currently this function does not exist on all Unixes, e.g. on Solaris.
235+
this.check_target_os(&["linux", "freebsd", "macos", "illumos"], link_name)?;
234236
let [fd, op] = this.check_shim(abi, Conv::C, link_name, args)?;
235237
let fd = this.read_scalar(fd)?.to_i32()?;
236238
let op = this.read_scalar(op)?.to_i32()?;

src/tools/miri/tests/pass-dep/libc/libc-fs-flock.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ignore-target: windows # File handling is not implemented yet
2+
//@ignore-target: solaris # Does not have flock
23
//@compile-flags: -Zmiri-disable-isolation
34

45
use std::fs::File;

0 commit comments

Comments
 (0)