From 15c005ea72d06c7ce4e8b72f34f26b3464f8bedf Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 1 Feb 2023 14:03:30 +0100 Subject: [PATCH] Fixed compilation errors with sntp --- components/lwip/include/apps/esp_sntp.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/components/lwip/include/apps/esp_sntp.h b/components/lwip/include/apps/esp_sntp.h index 6224cd60ec..dc8911c18f 100644 --- a/components/lwip/include/apps/esp_sntp.h +++ b/components/lwip/include/apps/esp_sntp.h @@ -49,11 +49,11 @@ extern "C" { #define esp_sntp_get_sync_interval sntp_get_sync_interval #define esp_sntp_restart sntp_restart -#ifndef SNTP_OPMODE_POLL +//#ifndef SNTP_OPMODE_POLL #define SNTP_OPMODE_POLL ESP_SNTP_OPMODE_POLL -#else -#warning "Defined!" -#endif /* SNTP_OPMODE_POLL */ +//#else +//#warning "Defined!" +//#endif /* SNTP_OPMODE_POLL */ /// SNTP time update mode typedef enum { @@ -245,39 +245,39 @@ void esp_sntp_servermode_dhcp(bool enable); * @brief if not build within lwip, provide translating inlines, * that will warn about thread safety */ -static inline __attribute__((deprecated("use esp_sntp_setoperatingmode() instead"))) +inline __attribute__((deprecated("use esp_sntp_setoperatingmode() instead"))) void sntp_setoperatingmode(u8_t operating_mode) { esp_sntp_setoperatingmode((esp_sntp_operatingmode_t)operating_mode); } -static inline __attribute__((deprecated("use esp_sntp_servermode_dhcp() instead"))) +#if LWIP_DHCP_GET_NTP_SRV +inline __attribute__((deprecated("use esp_sntp_servermode_dhcp() instead"))) void sntp_servermode_dhcp(int set_servers_from_dhcp) { -#if LWIP_DHCP_GET_NTP_SRV esp_sntp_servermode_dhcp(set_servers_from_dhcp); -#endif } +#endif -static inline __attribute__((deprecated("use esp_sntp_setservername() instead"))) +inline __attribute__((deprecated("use esp_sntp_setservername() instead"))) void sntp_setservername(u8_t idx, const char *server) { esp_sntp_setservername(idx, server); } -static inline __attribute__((deprecated("use esp_sntp_init() instead"))) +inline __attribute__((deprecated("use esp_sntp_init() instead"))) void sntp_init(void) { esp_sntp_init(); } -static inline __attribute__((deprecated("use esp_sntp_getservername() instead"))) +inline __attribute__((deprecated("use esp_sntp_getservername() instead"))) const char *sntp_getservername(u8_t idx) { return esp_sntp_getservername(idx); } -static inline __attribute__((deprecated("use esp_sntp_getserver() instead"))) +inline __attribute__((deprecated("use esp_sntp_getserver() instead"))) const ip_addr_t* sntp_getserver(u8_t idx) { return esp_sntp_getserver(idx);