summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-12-05 22:22:44 +0000
committerEmil Velikov <[email protected]>2017-05-19 19:46:49 +0100
commit115cb729d8feedf2d33187a5789ebc7582cc3042 (patch)
treec86592c5d647b3c1708a4a795f2ab6d21f2711ab /src/gallium/state_trackers/omx
parentd71ce62e84c588a804f457ad159c8ab94cf335b2 (diff)
st/omx: fix building against X11-less setups
The vl_*_screen_create API properly falls back to a NOP when we're building without specific platforms. So the only thing we need is to handle the lack of X11/Xlib.h and provide a dummy Display define. Cc: <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/omx')
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index 5afb58be3a3..fa2074ad1b7 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -35,7 +35,13 @@
#include <string.h>
#include <stdbool.h>
+#if defined(HAVE_X11_PLATFORM)
#include <X11/Xlib.h>
+#else
+#define XOpenDisplay(x) NULL
+#define XCloseDisplay(x)
+#define Display void
+#endif
#include "os/os_thread.h"
#include "util/u_memory.h"