summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/libreplace.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 1cdefc0870..f4ae715340 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -126,6 +126,7 @@ AC_CHECK_HEADERS(unix.h)
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(syscall.h)
AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/ucontext.h)
AC_CHECK_FUNCS(syscall setuid seteuid setreuid setresuid setgid setegid setregid setresgid setgroups)
AC_CHECK_FUNCS(chroot bzero strerror strerror_r memalign posix_memalign getpagesize)
@@ -415,6 +416,18 @@ if test x"$libreplace_cv_struct_timespec" = x"yes"; then
AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
fi
+AC_CACHE_CHECK([for ucontext_t type],libreplace_cv_ucontext_t, [
+ AC_TRY_COMPILE([
+#include <signal.h>
+#if HAVE_SYS_UCONTEXT_H
+#include <sys/ucontext.h>
+# endif
+],[ucontext_t uc; sigaddset(&uc.uc_sigmask, SIGUSR1);],
+ libreplace_cv_ucontext_t=yes,libreplace_cv_ucontext_t=no)])
+if test x"$libreplace_cv_ucontext_t" = x"yes"; then
+ AC_DEFINE(HAVE_UCONTEXT_T,1,[Whether we have ucontext_t])
+fi
+
AC_CHECK_FUNCS([printf memset memcpy],,[AC_MSG_ERROR([Required function not found])])
echo "LIBREPLACE_BROKEN_CHECKS: END"