You're right about this point of course:
--------------------
struct foo {
int a;
unsigned long b;
};
struct foo_align4 {
int a;
unsigned long b;
} __attribute__((aligned(4)));
int main(void)
{
printf("Normal: 'b' offset is %Zu\n",
__builtin_offsetof(struct foo, b));
printf("Align4: 'b' offset is %Zu\n",
__builtin_offsetof(struct foo_align4, b));
return 0;
}
--------------------
gives:
--------------------
Normal: 'b' offset is 8
Align4: 'b' offset is 8
--------------------
on sparc64.
So if we need to use packed because of that specific problem here,
fine.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html