[PATCH xserver] Xorg.wrap: Fix the console check on DragonFly
François Tigeot
ftigeot at wolfpond.org
Mon Mar 30 09:30:34 UTC 2020
DragonFly can use the same VT_GETINDEX ioctl mechanism as
the existing FreeBSD code.
Signed-off-by: François Tigeot <ftigeot at wolfpond.org>
---
hw/xfree86/xorg-wrapper.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 6c1022358..680646951 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -39,7 +39,8 @@
#include <sys/sysmacros.h>
#endif
#include <sys/types.h>
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__DragonFly__)
#include <sys/consio.h>
#endif
#include <unistd.h>
@@ -170,7 +171,8 @@ static int on_console(int fd)
r = fstat(fd, &st);
if (r == 0 && S_ISCHR(st.st_mode) && major(st.st_rdev) == 4)
return 1;
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__DragonFly__)
int idx;
if (ioctl(fd, VT_GETINDEX, &idx) != -1)
--
2.25.1
More information about the xorg-devel
mailing list