How do I enable LWIP's DNS_LOCAL_HOSTLIST_IS_DYNAMIC?
Posted: Wed Dec 05, 2018 4:37 am
I would like to add the ESP device itself to LWIP's local list of DNS entries. To do this I need to enable "dns_local_addhost()" by defining the "DNS_LOCAL_HOSTLIST_IS_DYNAMIC" macro (see lwip/dns.h). But I can't figure out how to do this via CMake.
It can't be done via sdkconfig.defaults because ESP doesn't expose it that way. It can't be done with component_compile_options() in my own component because that only turns it on for my component. I can't see how to enable this for the LWIP component and anything that depends on it (similar to the target_compile_definitions() CMake command with API or PUBLIC). How do I enable it?
(I'm only asking this because it seems to be the only way to have ESP resolve its own name/address via DNS. If there's a better way, post it to here.)
It can't be done via sdkconfig.defaults because ESP doesn't expose it that way. It can't be done with component_compile_options() in my own component because that only turns it on for my component. I can't see how to enable this for the LWIP component and anything that depends on it (similar to the target_compile_definitions() CMake command with API or PUBLIC). How do I enable it?
(I'm only asking this because it seems to be the only way to have ESP resolve its own name/address via DNS. If there's a better way, post it to here.)