this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
+ // The only reason this is not in the `posix` module is because the `macos` item has a
+ // different name.
+ "opendir" => {
+ let result = this.opendir(args[0])?;
+ this.write_scalar(result, dest)?;
+ }
+
+ // The `macos` module has a parallel foreign item, `readdir_r`, which uses a different
+ // struct layout.
+ "readdir64_r" => {
+ let result = this.linux_readdir64_r(args[0], args[1], args[2])?;
+ this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
+ }
+
// Time related shims
// This is a POSIX function but it has only been tested on linux.
// neither of which have any effect on our current PRNG.
let _flags = this.read_scalar(args[2])?.to_i32()?;
- this.gen_random(ptr, len as usize)?;
+ this.gen_random(ptr, len)?;
this.write_scalar(Scalar::from_uint(len, dest.layout.size), dest)?;
Ok(())
}