Skip to content

Commit 01b5e82

Browse files
committed
Add no-op shim for posix_fadvise
1 parent b222677 commit 01b5e82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shims/foreign_items.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
780780
this.write_null(dest)?;
781781
}
782782

783+
"posix_fadvise" => {
784+
// fadvise is only informational, we can ignore it.
785+
this.write_null(dest)?;
786+
}
787+
783788
"mmap" => {
784789
// This is a horrible hack, but since the guard page mechanism calls mmap and expects a particular return value, we just give it that value.
785790
let addr = this.read_scalar(args[0])?.not_undef()?;

0 commit comments

Comments
 (0)