summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/drm_common.c9
-rw-r--r--wscript8
2 files changed, 15 insertions, 2 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c
index 4ecad6f0c4..4a6349ebbe 100644
--- a/video/out/drm_common.c
+++ b/video/out/drm_common.c
@@ -21,12 +21,19 @@
#include <sys/ioctl.h>
#include <poll.h>
#include <sys/stat.h>
-#include <sys/vt.h>
#include <unistd.h>
#include <limits.h>
#include <math.h>
#include <time.h>
+#include "config.h"
+
+#if HAVE_CONSIO_H
+#include <sys/consio.h>
+#else
+#include <sys/vt.h>
+#endif
+
#include "drm_common.h"
#include "common/common.h"
diff --git a/wscript b/wscript
index 6e82a9e51b..4e41c5c821 100644
--- a/wscript
+++ b/wscript
@@ -283,6 +283,12 @@ iconv support use --disable-iconv.",
'func': check_statement(['sys/vt.h', 'sys/ioctl.h'],
'int m; ioctl(0, VT_GETMODE, &m)'),
}, {
+ 'name': 'consio.h',
+ 'desc': 'consio.h',
+ 'deps': '!vt.h',
+ 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'],
+ 'int m; ioctl(0, VT_GETMODE, &m)'),
+ }, {
'name': 'gbm.h',
'desc': 'gbm.h',
'func': check_cc(header_name=['stdio.h', 'gbm.h']),
@@ -495,7 +501,7 @@ video_output_features = [
}, {
'name': '--drm',
'desc': 'DRM',
- 'deps': 'vt.h',
+ 'deps': 'vt.h || consio.h',
'func': check_pkg_config('libdrm', '>= 2.4.74'),
}, {
'name': '--gbm',