[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8663435-c444-40bf-94e8-aa8b06d4404b@linaro.org>
Date: Wed, 30 Mar 2022 15:48:45 -0700
From: Tadeusz Struk <tadeusz.struk@...aro.org>
To: Kees Cook <keescook@...omium.org>
Cc: Dan Williams <dan.j.williams@...el.com>,
Gustavo Silva <gustavoars@...nel.org>,
Keith Packard <keithp@...thp.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uapi/linux/stddef.h: add include guards
On 3/30/22 14:49, Kees Cook wrote:
> On Tue, Mar 29, 2022 at 10:12:52AM -0700, Tadeusz Struk wrote:
>> Add iclude guarde to uapi/linux/stddef.h to prevent
>> redefining macros.
>>
>> Signed-off-by: Tadeusz Struk <tadeusz.struk@...aro.org>
>
> Hi!
>
> What was tripping over this? This isn't a new file, so has something
> changed with how it has been included?
Hi Kees,
Yes, it isn't new, but up until 5.15 it had only three lines:
#ifndef __always_inline
#define __always_inline inline
#endif
https://elixir.bootlin.com/linux/v5.15.32/source/include/uapi/linux/stddef.h
and one could include it as many time as one would liked.
Now that it has more #defines, and since it is an user api that people
can directly include in their projects, wouldn't it need to have
the include guards to avoid warnings about redefined symbols?
All the other headers in include/uapi/linux/ do have that.
--
Thanks,
Tadeusz
Powered by blists - more mailing lists