--- tests/crasher.c.orig 2020-11-11 02:14:18.000000000 +1000 +++ tests/crasher.c 2021-12-02 19:30:32.455650000 +1000 @@ -6,6 +6,11 @@ #include #include #include +#ifdef __BSDSUniX__ +#include +#include +#include +#endif #ifdef __FreeBSD__ #include #include @@ -40,7 +45,7 @@ fclose(out); fclose(maps); } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__BSDSUniX__) void write_maps(char *fname) { --- tests/Gtest-bt.c.orig 2020-11-11 02:14:18.000000000 +1000 +++ tests/Gtest-bt.c 2021-12-02 19:30:54.080807000 +1000 @@ -191,13 +191,13 @@ #elif UNW_TARGET_X86 #if defined __linux__ || defined __sun printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_EIP]); -#elif defined __FreeBSD__ +#elif defined __FreeBSD__ || defined __BSDSUniX__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.mc_eip); #endif #elif UNW_TARGET_X86_64 #if defined __linux__ || defined __sun printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_RIP]); -#elif defined __FreeBSD__ +#elif defined __FreeBSD__ || defined __BSDSUniX__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.mc_rip); #endif #endif --- tests/test-coredump-unwind.c.orig 2020-11-11 02:14:18.000000000 +1000 +++ tests/test-coredump-unwind.c 2021-12-02 19:31:11.572983000 +1000 @@ -222,7 +222,7 @@ #elif defined(UNW_TARGET_ARM) ip = uc->uc_mcontext.arm_pc; #endif -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined __BSDSUniX__ #ifdef __i386__ ip = uc->uc_mcontext.mc_eip; #elif defined(__amd64__) --- tests/Gtest-trace.c.orig 2020-11-11 02:14:18.000000000 +1000 +++ tests/Gtest-trace.c 2021-12-02 19:31:24.193265000 +1000 @@ -203,19 +203,19 @@ #elif UNW_TARGET_X86 #if defined __linux__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_EIP]); -#elif defined __FreeBSD__ +#elif defined __FreeBSD__ || defined __BSDSUniX__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.mc_eip); #endif #elif UNW_TARGET_X86_64 #if defined __linux__ || defined __sun printf (" @ %lx", (unsigned long) uc->uc_mcontext.gregs[REG_RIP]); -#elif defined __FreeBSD__ +#elif defined __FreeBSD__ || defined __BSDSUniX__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.mc_rip); #endif #elif defined UNW_TARGET_ARM #if defined __linux__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.arm_pc); -#elif defined __FreeBSD__ +#elif defined __FreeBSD__ || defined __BSDSUniX__ printf (" @ %lx", (unsigned long) uc->uc_mcontext.__gregs[_REG_PC]); #endif #endif