Luigi Rizzo wrote:
> Hi,
> the following message seems to suggest that the compiler
> (the way it is invoked) packs structures differently
> when building the kernel and userland.
> The stize of the structure in question is computed
> by both kernel and userland app using sizeof(),
> so there is no assumption on the size of its members,
> so i believe the only possibility of a mismatch is
> the one above.
> Any ideas ?

Probably a #pragma pack() in scope.

Add one explicitly before and after the structure definition
to force it to be the same in user space and the kernel, e.g.:

#pragma pack(1)         /* 1 byte packing */
struct foo {
#pragma pack()          /* whatever it was before */

The latter is like a "pop" of the former's "push", so you
should be OK, even though it looks like what is happening
is an include of an include file in the wrong place or in
code that has one in scope.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to