clover: Fix types collision between c++ and altivec
authorFrédéric Bonnard <frediz@debian.org>
Mon, 11 May 2020 13:57:20 +0000 (15:57 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 30 Jun 2020 20:44:07 +0000 (20:44 +0000)
For that, we undefine bool, vector, pixel as advised by altivec.h in the
specific case that defines them.

Cc: mesa-stable
Signed-off-by: Frédéric Bonnard <frediz@debian.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4948>

src/gallium/frontends/clover/core/error.hpp

index 0490c19a276d42462a8db23e7849942e573c0550..e46c05b865b979099297678c1c6a8b1b66718d01 100644 (file)
 #define CLOVER_CORE_ERROR_HPP
 
 #include "CL/cl.h"
+#if defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
+   #undef vector
+   #undef pixel
+   #undef bool
+#endif
 
 #include <stdexcept>
 #include <string>