about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libpanic_unwind/gcc.rs4
-rw-r--r--src/libunwind/libunwind.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs
index eb6dc5b5488..06c264725a9 100644
--- a/src/libpanic_unwind/gcc.rs
+++ b/src/libpanic_unwind/gcc.rs
@@ -143,7 +143,7 @@ const UNWIND_DATA_REG: (i32, i32) = (24, 25); // I0, I1
 // The personality routine for most of our targets, except ARM, which has a slightly different ABI
 // (however, iOS goes here as it uses SjLj unwinding).  Also, the 64-bit Windows implementation
 // lives in seh64_gnu.rs
-#[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))]
+#[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm"))))]
 #[lang = "eh_personality"]
 #[no_mangle]
 #[allow(unused)]
@@ -184,7 +184,7 @@ unsafe extern "C" fn rust_eh_personality(version: c_int,
 
 // ARM EHABI personality routine.
 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf
-#[cfg(all(target_arch = "arm", not(target_os = "ios")))]
+#[cfg(all(target_arch = "arm", not(target_os = "ios"), not(target_os = "netbsd")))]
 #[lang = "eh_personality"]
 #[no_mangle]
 unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State,
diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
index a640a2b7775..73a259bd443 100644
--- a/src/libunwind/libunwind.rs
+++ b/src/libunwind/libunwind.rs
@@ -93,7 +93,7 @@ extern "C" {
 }
 
 cfg_if! {
-if #[cfg(all(any(target_os = "ios", not(target_arch = "arm"))))] {
+if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm"))))] {
     // Not ARM EHABI
     #[repr(C)]
     #[derive(Copy, Clone, PartialEq)]