[igt-dev] [PATCH i-g-t 23/29] lib/igt_kms: Add FreeBSD support

D Scott Phillips d.scott.phillips at intel.com
Wed Dec 11 00:52:29 UTC 2019


Include the FreeBSD header that provides equivalent definitions to
linux/kd.h, and omit igt_hotplug_watch which depends upon udev.

Signed-off-by: D Scott Phillips <d.scott.phillips at intel.com>
---
 lib/igt_kms.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d20daaad..790d1fe8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -41,6 +41,9 @@
 #elif HAVE_SYS_KD_H
 #include <sys/kd.h>
 #endif
+#if defined(__FreeBSD__)
+#include <sys/consio.h>
+#endif
 
 #include <libudev.h>
 #include <poll.h>
@@ -4117,6 +4120,7 @@ void igt_reset_connectors(void)
 		igt_sysfs_set(forced_connectors[i].dir, "status",  "detect");
 }
 
+#if defined(__linux__)
 /**
  * igt_watch_hotplug:
  *
@@ -4155,6 +4159,11 @@ struct udev_monitor *igt_watch_hotplug(void)
 
 	return mon;
 }
+#else
+struct udev_monitor *igt_watch_hotplug(void) {
+	return NULL;
+}
+#endif
 
 static bool event_detected(struct udev_monitor *mon, int timeout_secs,
 			   const char *property)
-- 
2.23.0



More information about the igt-dev mailing list