aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-03-11 09:45:52 +0100
committerMichał Górny <mgorny@gentoo.org>2021-03-11 09:55:49 +0100
commit7962de6a71a4f8c99df1ad448a455c96ee4c33b3 (patch)
treef0578a33349c1df81ec293a3792051bfa6b3c301
parentUpdate m4 macros (diff)
downloadsandbox-7962de6a71a4f8c99df1ad448a455c96ee4c33b3.tar.gz
sandbox-7962de6a71a4f8c99df1ad448a455c96ee4c33b3.tar.bz2
sandbox-7962de6a71a4f8c99df1ad448a455c96ee4c33b3.zip
Fix detecting libsigsegv
Apparently the hack to pretend that libsigsegv's headers do not exist does not work anymore. Fix the test to actually respect library check status instead. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/libsigsegv_tst.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d0f46e2..b3bc10d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,7 +90,6 @@ AM_CONDITIONAL([SB_SCHIZO], [test "x$enable_schizo" != "xno"])
dnl this test fills up the stack and then triggers a segfault ...
dnl but it's hard to wrap things without a stack, so let's ignore
dnl this test for now ...
-ac_cv_header_sigsegv_h=no
ac_cv_lib_sigsegv_stackoverflow_install_handler=false
dnl Checks for libraries.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3baf5b1..52746ee 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -96,7 +96,9 @@ sb_printf_tst_LDADD = $(top_builddir)/libsbutil/libsbutil.la
malloc_hooked_tst_LDFLAGS = $(AM_LDFLAGS) -pthread
+libsigsegv_tst_CPPFLAGS = ${AM_CPPFLAGS}
if HAVE_LIBSIGSEGV
+libsigsegv_tst_CPPFLAGS += -DHAVE_LIBSIGSEGV
libsigsegv_tst_LDADD = -lsigsegv
endif
diff --git a/tests/libsigsegv_tst.c b/tests/libsigsegv_tst.c
index 82ed21b..2b17fa4 100644
--- a/tests/libsigsegv_tst.c
+++ b/tests/libsigsegv_tst.c
@@ -11,7 +11,7 @@
#define WRITE(msg) ({ ssize_t w = write(1, msg, sizeof(msg) - 1); w; })
-#ifdef HAVE_SIGSEGV_H
+#if defined(HAVE_SIGSEGV_H) && defined(HAVE_LIBSIGSEGV)
#include <sigsegv.h>
static int segv_handler(void *address, int serious)