diff --git a/vm/src/stdlib/os.rs b/vm/src/stdlib/os.rs index 9a901b36f..5eddc682f 100644 --- a/vm/src/stdlib/os.rs +++ b/vm/src/stdlib/os.rs @@ -1217,9 +1217,7 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) -> "ttyname" => ctx.new_rustfunc(os_ttyname), "SEEK_SET" => ctx.new_int(Whence::SeekSet as i8), "SEEK_CUR" => ctx.new_int(Whence::SeekCur as i8), - "SEEK_END" => ctx.new_int(Whence::SeekEnd as i8), - "SEEK_DATA" => ctx.new_int(Whence::SeekData as i8), - "SEEK_HOLE" => ctx.new_int(Whence::SeekHole as i8) + "SEEK_END" => ctx.new_int(Whence::SeekEnd as i8) }); #[cfg(not(target_os = "redox"))] @@ -1231,6 +1229,12 @@ fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) -> "openpty" => ctx.new_rustfunc(os_openpty), }); + #[cfg(not(target_os = "macos"))] + extend_module!(vm, module, { + "SEEK_DATA" => ctx.new_int(Whence::SeekData as i8), + "SEEK_HOLE" => ctx.new_int(Whence::SeekHole as i8) + }); + module }