OSDN Git Service

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)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 31 May 2017 20:32:03 +0000 (22:32 +0200)
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>
(cherry picked from commit 115cb729d8feedf2d33187a5789ebc7582cc3042)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
src/gallium/state_trackers/omx/entrypoint.c

index 5afb58b..fa2074a 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"