From 774970edbd2c9d5fb128d5e07ee9e8640112c3a9 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 3 Sep 2023 18:42:46 +0200 Subject: [PATCH 1/2] Fix compilation on Arduino 3 --- lib/libesp32/berry_tasmota/src/be_mdns_module.c | 10 +++++----- tasmota/tasmota_support/support_wifi.ino | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libesp32/berry_tasmota/src/be_mdns_module.c b/lib/libesp32/berry_tasmota/src/be_mdns_module.c index d0caa11b1b3a..19bc1ac8434a 100644 --- a/lib/libesp32/berry_tasmota/src/be_mdns_module.c +++ b/lib/libesp32/berry_tasmota/src/be_mdns_module.c @@ -20,11 +20,11 @@ BE_FUNC_CTYPE_DECLARE(m_mdns_stop, "", "") extern void m_mdns_set_hostname(struct bvm *vm, const char * hostname); BE_FUNC_CTYPE_DECLARE(m_mdns_set_hostname, "", "@s") -extern int32_t m_mdns_add_service(struct bvm *vm); -extern int32_t m_mdns_remove_service(struct bvm *vm); -extern int32_t m_dns_add_subtype(struct bvm *vm); -extern int32_t m_dns_add_hostname(struct bvm *vm); -extern int32_t m_dns_find_service(struct bvm *vm); +extern int m_mdns_add_service(struct bvm *vm); +extern int m_mdns_remove_service(struct bvm *vm); +extern int m_dns_add_subtype(struct bvm *vm); +extern int m_dns_add_hostname(struct bvm *vm); +extern int m_dns_find_service(struct bvm *vm); /* @const_object_info_begin module mdns (scope: global) { diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index 210a73bcb029..a9e4acdb76f5 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -42,6 +42,7 @@ const uint8_t WIFI_RETRY_OFFSET_SEC = WIFI_RETRY_SECONDS; // seconds #include // Wifi, MQTT, Ota, WifiManager #include "lwip/dns.h" +#include "esp_netif.h" int WifiGetRssiAsQuality(int rssi) { int quality = 0; From c7b03a8494cfc24b169167cd4a3916a67d5c5f67 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 3 Sep 2023 18:48:40 +0200 Subject: [PATCH 2/2] Fix compilation --- tasmota/tasmota_support/support_wifi.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index a9e4acdb76f5..2ad3ff3c52ad 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -42,7 +42,9 @@ const uint8_t WIFI_RETRY_OFFSET_SEC = WIFI_RETRY_SECONDS; // seconds #include // Wifi, MQTT, Ota, WifiManager #include "lwip/dns.h" -#include "esp_netif.h" +#if ESP_IDF_VERSION_MAJOR >= 5 + #include "esp_netif.h" +#endif int WifiGetRssiAsQuality(int rssi) { int quality = 0;