diff --git a/src/rt/rust_unwind.h b/src/rt/rust_unwind.h new file mode 100644 index 00000000000..ddc44b59627 --- /dev/null +++ b/src/rt/rust_unwind.h @@ -0,0 +1,21 @@ +// Unwinding stuff missing on some architectures (Mac OS X). + +#ifndef RUST_UNWIND_H +#define RUST_UNWIND_H + +#ifdef __APPLE__ +#include <libunwind.h> + +typedef int _Unwind_Action; +typedef void _Unwind_Context; +typedef void _Unwind_Exception; +typedef int _Unwind_Reason_Code; + +#else + +#include <unwind.h> + +#endif + +#endif + diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 0f5c11537fe..778e90df162 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -1,8 +1,8 @@ #include "rust_gc.h" #include "rust_internal.h" +#include "rust_unwind.h" #include "rust_upcall.h" #include <stdint.h> -#include <unwind.h> // Upcalls.