From caa47221a25734dbb74057cfbe3dd43bf1836c42 Mon Sep 17 00:00:00 2001 From: isidentical Date: Sat, 7 Sep 2019 03:48:00 +0300 Subject: [PATCH] macos fix --- vm/src/stdlib/os.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 }