Build fix for X11-less Linux builds
authorSlawomir Cygan <slawomir.cygan@intel.com>
Mon, 29 May 2017 20:01:49 +0000 (22:01 +0200)
committerPyry Haulos <phaulos@google.com>
Tue, 30 May 2017 01:10:06 +0000 (21:10 -0400)
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

index a73be99..1b27702 100644 (file)
@@ -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();
 }