On 17/11/2022 18:14, Kristina Martsenko wrote:
On 09/11/2022 10:47, Kevin Brodsky wrote:
typeof is (still) a GNU extension, which means that it cannot be used when building ISO C (e.g. -std=c99). It should therefore be avoided in uapi headers in favour of the ISO-friendly __typeof__.
Reported-by: Ruben Ayrapetyan ruben.ayrapetyan@arm.com Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com
This is really an upstream issue that has gone unnoticed so far, probably because __ALIGN_KERNEL is not widely used. Our recent commit a5cf170fd954 ("uapi: siginfo.h: Modify struct sigevent for PCuABI") revealed it, as it uses __ALIGN_KERNEL in siginfo.h in such a way that the macro is always expanded, so any userspace ISO C/C++ code including siginfo.h gets a build failure.
Thinking about posting this on LKML, any opinion for/against or suggestion?
It's a bit late now but FWIW the patch looks good to me too and should be easy to upstream (you may be asked to fix netfilter as well).
Thanks, Kristina
Haven't got to the upstreaming part yet so not too late, thanks for the feedback! I do suspect I might be asked to fix the other occurrences too, we'll see what happens.
Kevin