let result = this.macos_fstat(args[0], args[1])?;
this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
- // Environment related shims
- "_NSGetEnviron" => {
- this.write_scalar(this.memory.extra.environ.unwrap().ptr, dest)?;
- }
+
// The only reason this is not in the `posix` module is because the `linux` item has a
// different name.
"opendir$INODE64" => {
this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
+ // Environment related shims
+ "_NSGetEnviron" => {
+ this.write_scalar(this.machine.env_vars.environ.unwrap().ptr, dest)?;
+ }
+
// Time related shims
"gettimeofday" => {
let result = this.gettimeofday(args[0], args[1])?;
"SecRandomCopyBytes" => {
let len = this.read_scalar(args[1])?.to_machine_usize(this)?;
let ptr = this.read_scalar(args[2])?.not_undef()?;
- this.gen_random(ptr, len as usize)?;
+ this.gen_random(ptr, len)?;
this.write_null(dest)?;
}