Skip to content

Commit 808b149

Browse files
committed
Use raw syscall numbers
1 parent dddeda7 commit 808b149

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ shell-escape = "0.1.4"
4646
rustc-workspace-hack = "1.0.0"
4747
hex = "0.3.2"
4848
rand = "0.6.5"
49-
libc = "0.2.51"
5049

5150
[build-dependencies]
5251
vergen = "3"

src/fn_call.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
217217
// `libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK)`
218218
// is called if a `HashMap` is created the regular way.
219219
match this.read_scalar(args[0])?.to_usize(this)? as i64 {
220-
libc::SYS_getrandom => {
220+
// SYS_getrandom on x86_64 and x86 respectively
221+
318 | 355 => {
221222
match this.machine.rng.as_ref() {
222223
Some(rng) => {
223224
let ptr = this.read_scalar(args[1])?.to_ptr()?;

0 commit comments

Comments
 (0)