Subject: Re: Goofyness w/ llc & netatalk
To: None <tech-net@NetBSD.ORG>
From: None <is@Beverly.Rhein.DE>
Date: 02/09/1997 22:53:29
Bill Studenmund (email@example.com) wrote:
: On port-i386, sizeof(struct llc) == 8, while on port-mac68k
: sizeof(struct llc) == 10 !!!!!
: The weird thing was that the code always generated a correct
: snap header, just adding two extra bytes onto the end.
: How can we fix this?
Basically, the compiler is free to add to structs whatever padding it
things will help, or hinder, performance. Code that depends on a certain
layout, other than to assume it will be the same for one execution of
the program, is in error.
All we can legally do is to access bytes from a byte array, by byte offset.