Re: [PATCH v2] stddef: make __struct_group() UAPI C++-friendly
From: Kees Cook
Date: Fri Dec 20 2024 - 12:10:42 EST
On Thu, 19 Dec 2024 14:57:34 +0100, Alexander Lobakin wrote:
> For the most part of the C++ history, it couldn't have type
> declarations inside anonymous unions for different reasons. At the
> same time, __struct_group() relies on the latters, so when the @TAG
> argument is not empty, C++ code doesn't want to build (even under
> `extern "C"`):
>
> ../linux/include/uapi/linux/pkt_cls.h:25:24: error:
> 'struct tc_u32_sel::<unnamed union>::tc_u32_sel_hdr,' invalid;
> an anonymous union may only have public non-static data members
> [-fpermissive]
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] stddef: make __struct_group() UAPI C++-friendly
https://git.kernel.org/kees/c/724c6ce38bba
Take care,
--
Kees Cook