diff options
Diffstat (limited to 'bits/socket.h')
-rw-r--r-- | bits/socket.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bits/socket.h b/bits/socket.h index 772074d..e83ad5b 100644 --- a/bits/socket.h +++ b/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. 4.4 BSD version. - Copyright (C) 1991-2024 Free Software Foundation, Inc. + Copyright (C) 1991-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -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. */ }; /* Ancillary data object manipulation macros. */ -#if __glibc_c99_flexarr_available -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif +#define CMSG_DATA(cmsg) \ + ((unsigned char *) (cmsg) + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) |