[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGdZYLn5pokOQN-uqeaVPSOtVUHy+CGmuBduhgtV+Vft8WxbQ@mail.gmail.com>
Date: Mon, 18 Mar 2024 09:55:49 -0700
From: Khazhy Kumykov <khazhy@...omium.org>
To: Dmitrii Bundin <dmitrii.bundin.a@...il.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, LKML <linux-kernel@...r.kernel.org>,
Daniel Xu <dxu@...uu.xyz>, Viktor Malik <vmalik@...hat.com>, Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] tools/resolve_btfids: Include linux/types.h
On Fri, Mar 15, 2024 at 10:09 AM Dmitrii Bundin
<dmitrii.bundin.a@...il.com> wrote:
>
> On Fri, Mar 15, 2024 at 6:41 PM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
> > No one reported this, though lots of people
I'm also seeing this, on clang.
> > are building resolve_btfids that uses this header
> > as part of the kernel build.
>
> GCC version 7.5.0, GNU Make 4.1
> Steps to reproduce:
> 1. Check out the commit e5eb28f6d1afebed4bb7d740a797d0390bd3a357
> 2. cd tools/bpf/resolve_btfids/
> 3. make
>
> The steps above produces the following error messages (similar error
> output truncated for clarity):
>
> In file included from main.c:73:0:
> /linux/tools/include/linux/btf_ids.h:7:2: error: unknown type name ‘u32’
> u32 cnt;
yup, that's the error I'm seeing.
> ^~~
>
> The other sources including <linux/btf_ids.h> usually includes
> (directly or indirectly) <linux/types.h> before which is not the case
> for tools/bpf/resolve_btfids/main.c. So that looks reasonable to me to
> bring all the required type definitions into scope explicitly in
> linux/btf_ids.h. Any thoughts on this?
>
Powered by blists - more mailing lists