Subject: Re: [PATCH iproute2-next 09/10] ipstats: Expose bond stats in ipstats

From: Petr Machata <[email-masked]>
Date: Fri, 27 May 2022 16:50:12 +0200

Stephen Hemminger <[email-masked]> writes:

> This change won't build if clang is used to build iproute2.
> It has valid warning:
>
>     CC       iplink_bond.o
> iplink_bond.c:935:10: error: initializer element is not a compile-time constant
>         .desc = ipstats_stat_desc_bond_tmpl_lacp,
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> iplink_bond.c:957:10: error: initializer element is not a compile-time constant
>         .desc = ipstats_stat_desc_bond_tmpl_lacp,
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 errors generated.
>
> Since desc is a structure, you can't just assign an existing data structure
> to the new initializer.  It needs to be a pointer or macro.

Yeah, it has to be a macro. I'll send a patch probably next week.