I have to port source code from to an ARM platform that runs Linux. Unfortunately I have run into unaligned memory access problems. The source uses pointer casts and access
There is __attribute__((__packed__)) which might help in some instances, but I really think this code should be cleaned up rather sooner than later, because it is likely that you will spend more time working around problems than it would take to fix it once and for all.