package/mpv: fix build on ppc64
PATCH 1/1 package/mpv: fix build on ppc64
Our current patch was done on a previous version of mpv. Since then, the include-path has changed, and stdbool is already included earlier. So, including it again will serve no purpose...
So, the bool type defined in the altivec case is back to bite, and it is not any happier than before.
We fix our patch to simply redefine bool to the correct type, but just in the altivec case.
Fixes:
http://autobuild.buildroot.org/results/e91/e914bc0f955e4ba740614f93cbfa401b673b754b/ http://autobuild.buildroot.org/results/4c1/4c150fedc74530d09e8ecd678dcf5664251606e7/ and countless others...
--- package/mpv/0002-Fix-build-on-powerpc64-altivec.patch | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
package/mpv/0002-Fix-build-on-powerpc64-altivec.patch +12 -3
@@ -4,9 +4,14 @@ On powerpc64le, the SDL header from SDL2 may include altivec.h and this (combined with -std=c99) will cause a compile failure due to bool being redefined as a vector type. -Re-include stdbool.h after SDL.h to restore the normal bool type. +We can't (re-)include stdbool.h because it is already included earlier. + +So we just redefine it to the correct type, but only in the altivec +case. Signed-off-by: Sam Bobroff <[email protected]> +[yann.morin.1998 at free.fr: really fix it] +Signed-off-by: "Yann E. MORIN" <[email protected]> --- audio/out/ao_sdl.c | 1 + 1 file changed, 1 insertion(+)
@@ -15,11 +20,15 @@ diff --git a/audio/out/ao_sdl.c b/audio/out/ao_sdl.c index d9d0062..0cb80d6 100644 --- a/audio/out/ao_sdl.c +++ b/audio/out/ao_sdl.c -@@ -29,6 +29,7 @@ +@@ -29,6 +29,11 @@ #include "osdep/timer.h" #include <SDL.h> -+#include <stdbool.h> ++#ifdef _ALTIVEC_H ++/* Undo altivec (incorrectly) redefining bool */ ++#undef bool ++#define bool _Bool ++#endif struct priv {
Signature · 1 line
2.7.4
PATCH 1/1 package/mpv: fix build on ppc64
Hello,
Quoted 10 lines · Yann E. MORIN
Our current patch was done on a previous version of mpv. Since then, the include-path has changed, and stdbool is already included earlier. So, including it again will serve no purpose...
So, the bool type defined in the altivec case is back to bite, and it is not any happier than before.
We fix our patch to simply redefine bool to the correct type, but just in the altivec case.
Quoted 7 lines
Fixes:
http://autobuild.buildroot.org/results/e91/e914bc0f955e4ba740614f93cbfa401b673b754b/ http://autobuild.buildroot.org/results/4c1/4c150fedc74530d09e8ecd678dcf5664251606e7/ and countless others...Signed-off-by "Yann E. MORIN" <[email protected]>Cc Gustavo Zacarias <[email protected]>
We have a different proposal from Sam:
https://patchwork.ozlabs.org/patch/706869/
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/mpv: fix build on ppc64
Thomas, All,
On 2017-02-19 12:08 +0100, Thomas Petazzoni spake thusly:
Quoted 16 lines · Yann E. MORIN
Quoted 15 lines
Our current patch was done on a previous version of mpv. Since then, the include-path has changed, and stdbool is already included earlier. So, including it again will serve no purpose...
So, the bool type defined in the altivec case is back to bite, and it is not any happier than before.
We fix our patch to simply redefine bool to the correct type, but just in the altivec case.
Fixes:
http://autobuild.buildroot.org/results/e91/e914bc0f955e4ba740614f93cbfa401b673b754b/ http://autobuild.buildroot.org/results/4c1/4c150fedc74530d09e8ecd678dcf5664251606e7/ and countless others...
Quoted 5 lines
Quoted 2 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Gustavo Zacarias <[email protected]>We have a different proposal from Sam:
https://patchwork.ozlabs.org/patch/706869/
Bizarely enough, I missed it...
Indeed, Sam's patch is better. I'lll withdraw mine.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'