From: Emil Velikov Date: Sat, 17 Jun 2017 10:40:21 +0000 (+0100) Subject: r600: include libelf headers only as needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68aa39d5c2fed23736f07136390e61e1740e4d6f;p=mesa.git r600: include libelf headers only as needed Headers are required only when building with OpenCL. As we're building w/o it libelf may be missing, hence we'll error out as below: src/gallium/drivers/r600/evergreen_compute.c:27:10: fatal error: 'gelf.h' file not found ^ 1 error generated. Fixes: d96a210842 ("r600g,compute: provide local copy of functions from ac_binary.c") Reviewed-by: Jan Vesely Reported-by: Mauro Rossi Tested-by: Mauro Rossi Signed-off-by: Emil Velikov --- diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 37cfed4497b..6e87539cfe7 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -24,8 +24,10 @@ * Adam Rak */ +#ifdef HAVE_OPENCL #include #include +#endif #include #include #include "pipe/p_defines.h"