summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wang <novalazy@gmail.com>2021-06-21 10:52:02 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-08-21 01:04:28 +0300
commitd36396a7f94593c7e55b55909fee00953c52b5d0 (patch)
treea8c3e9813bd829d67fb40d29b74c6690066a1df8
parent8617cdf4d7de1318bec9437abf05dd927b9e7f5b (diff)
downloadbdwgc-d36396a7f94593c7e55b55909fee00953c52b5d0.tar.gz
Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
Issue #359 (bdwgc). * os_dep.c [MPROTECT_VDB && !DARWIN && !MSWIN32 && !MSWINCE && FREEBSD && __FreeBSD__>=7] (CODE_OK): Do not check against EXC_DSI and BUS_PAGE_FAULT.
-rw-r--r--os_dep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os_dep.c b/os_dep.c
index 9926c6c9..1e4d0169 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -3149,7 +3149,8 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void)
# ifndef SEGV_ACCERR
# define SEGV_ACCERR 2
# endif
-# if defined(AARCH64) || defined(ARM32) || defined(MIPS)
+# if defined(AARCH64) || defined(ARM32) || defined(MIPS) \
+ || __FreeBSD__ >= 7
# define CODE_OK (si -> si_code == SEGV_ACCERR)
# elif defined(POWERPC)
# define AIM /* Pretend that we're AIM. */