From: Øyvind Kolås Date: Sat, 15 Feb 2020 06:22:25 +0000 (+0100) Subject: babl: babl-fish-path improve portability for ppc X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~9^2~26 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a585692ae33cedf1823fa788172a5e56c3ef5f2b;p=babl.git babl: babl-fish-path improve portability for ppc Quoting his explaination for why this fixes things (the other half of the same function was already portable.) "This breaks on PowerPC 32-bit, because the calling convention for passing a union is to pass a pointer to a temporary copy of the union. This pointer isn't as a function pointer. On some other platforms, the call would just copy the union, which is like copying the function pointer. On all platforms, the compiler doesn't check the type, because babl_conversion_new() has a va_arg(3) prototype." Portabilitiy issue figured out by George Koehler, This fixes issue #24. --- diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index c8911d1..284d452 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -404,7 +404,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "linear", conv->function, + "linear", conv->function.linear, NULL); break; case BABL_CONVERSION_PLANAR: @@ -413,7 +413,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "planar", conv->function, + "planar", conv->function.planar, NULL); break; case BABL_CONVERSION_PLANE: @@ -422,7 +422,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "plane", conv->function, + "plane", conv->function.plane, NULL); break; default: