gallium/u_tests: fix ifdef for sync_file fences
authorGeorge Kyriazis <george.kyriazis@intel.com>
Tue, 3 Oct 2017 15:31:16 +0000 (10:31 -0500)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Tue, 3 Oct 2017 16:50:48 +0000 (11:50 -0500)
include libsync.h only when libdrm is compiled in

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_tests.c

index 2e931c0cd01bce017e83bad2f8d2c6868469b44f..3cc79afcffdf5720513e4308ac1463ffde45c5ed 100644 (file)
@@ -490,7 +490,7 @@ null_fragment_shader(struct pipe_context *ctx)
    util_report_result(qresult.u64 == 2);
 }
 
-#ifdef PIPE_OS_LINUX
+#if defined(PIPE_OS_LINUX) && defined(HAVE_LIBDRM)
 #include <libsync.h>
 #else
 #define sync_merge(str, fd1, fd2) (-1)