From 95ea5d5c0b0342ec95899c6d33311b6ff40732b3 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 23 Dec 2014 19:07:12 -0800 Subject: [PATCH] Provide sighandler_t fallback for non-GNU-libc platforms Signed-off-by: Alan Coopersmith Signed-off-by: Daniel Vetter --- configure.ac | 2 ++ lib/igt_core.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index bee40ce3..16d6a2ef 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,8 @@ AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h]) AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT #include ]) +AC_CHECK_TYPES([sighandler_t],[],[],[AC_INCLUDES_DEFAULT +#include ]) AC_CHECK_FUNCS([swapctl]) AC_CHECK_FUNCS([asprintf]) diff --git a/lib/igt_core.c b/lib/igt_core.c index 0f8a5bba..0d0e80cf 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1206,6 +1206,10 @@ void igt_waitchildren(void) #define MAX_SIGNALS 32 #define MAX_EXIT_HANDLERS 10 +#ifndef HAVE_SIGHANDLER_T +typedef void (*sighandler_t)(int); +#endif + static struct { sighandler_t handler; bool installed;