On Fri, Jun 06, 2025 at 08:41:39AM +0200, Jerome Forissier wrote: > Split net/lwip/wget.c in two: one part which implements CONFIG_WGET > stays in net/ while the part that implements CONFIG_CMD_WGET is moved > into cmd/. > > Signed-off-by: Jerome Forissier <[email protected]> [snip] > diff --git a/include/net-lwip.h b/include/net-lwip.h > index b762956e8fd..cf3cf513b2b 100644 > --- a/include/net-lwip.h > +++ b/include/net-lwip.h > @@ -6,6 +6,19 @@ > #include <lwip/ip4.h> > #include <lwip/netif.h> > > +#if CONFIG_IS_ENABLED(WGET_CACERT) > +/* HTTPS authentication mode */ > +enum auth_mode { > + AUTH_NONE, > + AUTH_OPTIONAL, > + AUTH_REQUIRED, > +}; > + > +extern char *cacert; > +extern size_t cacert_size; > +extern enum auth_mode cacert_auth_mode; > +#endif
Since we aren't going to run in to compile problems elsewhere because
these are in the header file (IOW we don't reference CONFIG symbols
which might not be set), we shouldn't guard these here. In general it's
an anti-pattern because it makes it harder to do:
if (IS_ENABLED(CONFIG_FOO)) { ... }
in code. Thanks.
--
Tom
signature.asc
Description: PGP signature

