macos fix

This commit is contained in:
isidentical
2019-09-07 03:48:00 +03:00
parent f7d918afd8
commit caa47221a2

View File

@@ -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
}