[vlc-devel] Patches to work-around __packed__ on iOS

Felix Paul Kühne fkuehne.videolan at googlemail.com
Mon Mar 26 18:53:59 CEST 2012

On 26.03.2012, at 18:47, "Rémi Denis-Courmont" <remi at remlab.net> wrote:

> Le lundi 26 mars 2012 19:39:52 Felix Paul Kühne, vous avez écrit :
>>> Patch 0006 does not look right.
>> The rationale behind this patch is that __packed__ works correctly on OS X
>> and is therefore caught by the first #if. For iOS and hypothetical OS X
>> variants without support for this, my patch is applied. For iOS, pack(4)
>> is correct according to info provided by apple's engineers on their
>> subscription-only forums.
> RTFM. pack(4) is not the same as __attribute__((packed)).
> With this patch, the compilation might be fixed, but the machine code will be 
> wrong.

Sorry, but this is the intention. Using __packed__ leads to memory alignment issues when running the code on ARM (especially in src/input in the time shift code). This obviously does not happen on x86 or PPC platforms.
Yes, the correct approach here would be to use a non-broken compiler. Regrettably, such a thing isn't available for production releases at this point.

Best regards,

More information about the vlc-devel mailing list