summaryrefslogtreecommitdiff
path: root/user/sdl2/ensure-c++-on-ppc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/sdl2/ensure-c++-on-ppc.patch')
-rw-r--r--user/sdl2/ensure-c++-on-ppc.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/user/sdl2/ensure-c++-on-ppc.patch b/user/sdl2/ensure-c++-on-ppc.patch
new file mode 100644
index 000000000..03708c9b6
--- /dev/null
+++ b/user/sdl2/ensure-c++-on-ppc.patch
@@ -0,0 +1,14 @@
+On PowerPC systems, using SDL2 in a C++ codebase would FTBFS.
+
+--- SDL2-2.0.8/include/SDL_cpuinfo.h.old 2018-03-01 16:34:41.000000000 +0000
++++ SDL2-2.0.8/include/SDL_cpuinfo.h 2018-08-07 02:25:05.720000000 +0000
+@@ -53,6 +53,9 @@
+ #ifdef __ALTIVEC__
+ #if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
+ #include <altivec.h>
++#ifdef __cplusplus
++#undef vector
++#endif
+ #undef pixel
+ #undef bool
+ #endif