diff --git a/examples/common_components/protocol_examples_common/Kconfig.projbuild b/examples/common_components/protocol_examples_common/Kconfig.projbuild index e1fee9b61..0e6997983 100644 --- a/examples/common_components/protocol_examples_common/Kconfig.projbuild +++ b/examples/common_components/protocol_examples_common/Kconfig.projbuild @@ -142,6 +142,8 @@ menu "Example Connection Configuration" config EXAMPLE_CONNECT_IPV6 bool "Obtain IPv6 link-local address" + depends on IDF_TARGET_ESP32 + # ToDo: remove once IPV6 is supported on esp32s2 default y help By default, examples will wait until IPv4 and IPv6 addresses are obtained. diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 1c6bd98d1..0e9b6a5ea 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -12,7 +12,9 @@ #include "sdkconfig.h" #include "esp_event.h" #include "esp_wifi.h" +#if CONFIG_EXAMPLE_CONNECT_ETHERNET #include "esp_eth.h" +#endif #include "esp_log.h" #include "tcpip_adapter.h" #include "freertos/FreeRTOS.h"