st/omx: fix building against X11-less setups
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 5 Dec 2016 22:22:44 +0000 (22:22 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 May 2017 18:46:49 +0000 (19:46 +0100)
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: <mesa-stable@lists.freedesktop.org>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/state_trackers/omx/entrypoint.c

index 5afb58be3a3868034fc489a3ef1337190a9f8320..fa2074ad1b77121d8151b223e444929dc404e9a0 100644 (file)
 #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"