[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <870a1165-6281-4ca7-9379-83fc6cccf702@stanley.mountain>
Date: Thu, 14 Nov 2024 14:05:53 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Philipp Reisner <philipp.reisner@...bit.com>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
linux-sparse@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] compiler.h: Add missing include statement for
build_bug.h
On Thu, Nov 14, 2024 at 12:01:42PM +0100, Philipp Reisner wrote:
> On Thu, Nov 14, 2024 at 11:40 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> >
> > On Thu, Nov 14, 2024 at 11:14:02AM +0100, Philipp Reisner wrote:
> > > compiler.h defines __must_be_array() and __must_be_cstr() and both
> > > expand to BUILD_BUG_ON_ZERO(). build_bug.h defines BUILD_BUG_ON_ZERO().
> > > So far compiler.h lacks to include build_bug.h.
> > >
> > > Fix compiler.h by including build_bug.h. With that compiler.h and
> > > build_bug.h depend on each other.
> > >
> > > Signed-off-by: Philipp Reisner <philipp.reisner@...bit.com>
> > > ---
> >
> > Fixes: ec0bbef66f86 ("Compiler Attributes: homogenize __must_be_array")
> >
> > What actually breaks? This commit is six years old. It's weird that we're only
> > seeing build breakage now. Or did you just notice this while reviewing the
> > code?
> >
>
> I am working on a compilation unit that includes linux/string.h.
> Compiling it breaks when using strscp(). That is since commit
> commit 559048d156ff3391c4b793779a824c9193e20442
> Author: Kees Cook <kees@...nel.org>
> Date: Mon Aug 5 14:43:44 2024 -0700
>
> Of course, my trivial workaround is including build_bug.h in my
> source; it is just not the proper way to fix this.
>
Ah, okay. Thanks. I thought it might have broken in tree code.
regards,
dan carpenter
Powered by blists - more mailing lists