commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hurd,commited] bits/socket.h: Update to recent BSD definition


From: Florian Weimer
Subject: Re: [hurd,commited] bits/socket.h: Update to recent BSD definition
Date: Thu, 02 Jan 2025 11:12:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

* 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 <dnietoc@gmail.com>
> ---
>  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]