From 8fa6899a770138ceb323003e34f01d8c2b0956a9 Mon Sep 17 00:00:00 2001 From: Slawomir Cygan Date: Mon, 29 May 2017 22:01:49 +0200 Subject: [PATCH] Build fix for X11-less Linux builds The combination of recent refactor on release branch and merge to master resulted in XinitThreads being called from code that may be compiled even if X11 API is not available. Components: Framework VK-GL-CTS Issue: 450 Change-Id: Ia7d1d23eabd1b222d5039868c1fb762e1d42f01f --- framework/platform/lnx/tcuLnxPlatform.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp index a73be99..1b27702 100644 --- a/framework/platform/lnx/tcuLnxPlatform.cpp +++ b/framework/platform/lnx/tcuLnxPlatform.cpp @@ -84,6 +84,7 @@ LinuxPlatform::LinuxPlatform (void) tcu::Platform* createPlatform (void) { +#if defined (DEQP_SUPPORT_X11) // From man:XinitThreads(3): // // The XInitThreads function initializes Xlib support for concurrent @@ -91,6 +92,7 @@ tcu::Platform* createPlatform (void) // a multi-threaded program calls, and it must complete before any other // Xlib call is made. DE_CHECK_RUNTIME_ERR(XInitThreads() != 0); +#endif // DEQP_SUPPORT_X11 return new tcu::lnx::LinuxPlatform(); } -- 2.7.4