[PATCH:intel-gpu-tools 5/7] Provide sighandler_t fallback for non-GNU-libc platforms
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Dec 23 19:07:12 PST 2014
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
configure.ac | 2 ++
lib/igt_core.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index bee40ce..16d6a2e 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 <sys/sysinfo.h>
])
+AC_CHECK_TYPES([sighandler_t],[],[],[AC_INCLUDES_DEFAULT
+#include <signal.h>])
AC_CHECK_FUNCS([swapctl])
AC_CHECK_FUNCS([asprintf])
diff --git a/lib/igt_core.c b/lib/igt_core.c
index e6b091a..3670652 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1204,6 +1204,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;
--
1.7.9.2
More information about the xorg-devel
mailing list