Fix compilation errors on Darwin.

This commit is contained in:
Dan Gohman
2018-11-28 16:27:10 -08:00
parent adb76ba9f1
commit 38acc069fa
3 changed files with 10 additions and 8 deletions

View File

@@ -41,9 +41,9 @@ pub extern "C" fn RecordTrap(pc: *const u8, _codeSegment: *const CodeSegment) {
#[allow(non_snake_case)]
#[no_mangle]
pub extern "C" fn Unwind() {
JMP_BUFS.with(|bufs| unsafe {
JMP_BUFS.with(|bufs| {
let buf = bufs.borrow_mut().pop().unwrap();
longjmp(&buf, 1);
unsafe { longjmp(&buf, 1) };
})
}