* Samuel Thibault: > The old BSD 4.4 definition (not used by Linux) was not 64b-proof: the > cmsg_data field is supposed to CMSG_ALIGN'ed (as can be also seen in the > CMSG_LEN macro). > > Suggested-by: Diego Nieto Cid <[email protected]> > --- > bits/socket.h | 12 ++++-------- > sysdeps/mach/hurd/bits/socket.h | 12 ++++-------- > 2 files changed, 8 insertions(+), 16 deletions(-) > > diff --git a/bits/socket.h b/bits/socket.h > index 62276fb49d..e83ad5bc01 100644 > --- a/bits/socket.h > +++ b/bits/socket.h > @@ -221,17 +221,13 @@ struct cmsghdr > of cmsghdr structure. */ > int cmsg_level; /* Originating protocol. */ > int cmsg_type; /* Protocol specific type. */ > -#if __glibc_c99_flexarr_available > - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ > -#endif > + /* This field is to be aligned with CMSG_ALIGN */ > + /* __extension__ unsigned char __cmsg_data __flexarr; */ /* Ancillary data. > */ > };
Does the Linux version have the same problem? Thanks, Florian
