ports/graphics/igt-gpu-tools/files/patch-runner_executor.c
Jake Freeland 5d303ab480
graphics/igt-gpu-tools: Test suite for drm drivers
The igt testing suite is separated into tests and tools that target kms,
memory management, and command submission.  These tests are especially
helpful for low-level reporting, transparent tracking of kernel changes,
and efficient debugging of modern drm drivers.

Reviewed by:	diizzy, lwhsu, jrm
Differential Revision:	https://reviews.freebsd.org/D36213
2022-09-09 12:06:45 -03:00

39 lines
775 B
C

--- runner/executor.c.orig 2022-08-31 20:00:01 UTC
+++ runner/executor.c
@@ -2,7 +2,9 @@
#include <errno.h>
#include <fcntl.h>
#include <glib.h>
+#ifdef __linux__
#include <linux/watchdog.h>
+#endif
#if HAVE_OPING
#include <oping.h>
#endif
@@ -14,7 +16,9 @@
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/poll.h>
+#ifdef __linux__
#include <sys/signalfd.h>
+#endif
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -32,6 +36,16 @@
#define KMSG_HEADER "[IGT] "
#define KMSG_WARN 4
+
+#ifdef __FreeBSD__
+#include <sys/watchdog.h>
+struct signalfd_siginfo {
+ uint32_t ssi_signo;
+ uint32_t ssi_pid;
+};
+#define WDIOC_KEEPALIVE WDIOCPATPAT
+#define signalfd(fd, mask, flags) -ENOSYS
+#endif
static struct {
int *fds;