summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-01-25 16:13:08 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-01-25 16:13:08 +0000
commitdad53f7da826ea1199cf0b3b63e33e852373b084 (patch)
treea975917bcbc6f7e1244a78def9a83c677689015d
parentd8b76fa95c55331db4f475ee34caa7e8725ec421 (diff)
Fix build on systems not supporting SEGV_BNDERR
-rw-r--r--src/src/exim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index d658dbfcb..de25b3256 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -266,6 +266,7 @@ static void
segv_handler(int sig, siginfo_t * info, void * uctx)
{
log_write(0, LOG_MAIN|LOG_PANIC, "SIGSEGV (fault address: %p)", info->si_addr);
+# if defined(SEGV_MAPERR) && defined(SEGV_ACCERR) && defined(SEGV_BNDERR) && defined(SEGV_PKUERR)
switch (info->si_code)
{
case SEGV_MAPERR: log_write(0, LOG_MAIN|LOG_PANIC, "SEGV_MAPERR"); break;
@@ -273,6 +274,7 @@ switch (info->si_code)
case SEGV_BNDERR: log_write(0, LOG_MAIN|LOG_PANIC, "SEGV_BNDERR"); break;
case SEGV_PKUERR: log_write(0, LOG_MAIN|LOG_PANIC, "SEGV_PKUERR"); break;
}
+# endif
if (US info->si_addr < US 4096)
log_write(0, LOG_MAIN|LOG_PANIC, "SIGSEGV (null pointer indirection)");
else