Thank you Greg!

I didn't know about this detail, normally I use only "depends on" and
"select", but in fact "default" fixes the issue!

I will submit some fixes to improve our Kconfig. I invite other to help:
whenever you see some unsatisfied dependence, please submit a fix.

BR,

Alan

On Sun, Jul 7, 2024 at 9:19 AM Gregory Nutt <spudan...@gmail.com> wrote:

>
> On 7/7/2024 6:05 AM, Alan C. Assis wrote:
> > I was thinking about an idea to include some #ifdefs to detect that some
> > probable feature combination:
> >
> > https://github.com/apache/nuttx/pull/12638
> >
> >   I.E.: if the user selected NET and IPv4 it is probable that he will
> need
> > ICMP, but we cannot enforce this rule on Kconfig because someone could
> want
> > to use his device without ICMP.
> >
> > But that solution will end up bringing more #ifdef to the code that is
> > something we don't want and we should avoid.
>
> Can you can accomplish this in the Kconfig be using a default value that
> depends on IPv4 like:
>
> config NET_ICMP
>      ....
>      default NET_IPv4
>
> You can still disable ICMP, but the default should be "enabled" if IPv4
> is enabled.
>
>

Reply via email to