]> granicus.if.org Git - esp-idf/commitdiff
lwip: add compatibility headers for sntp.h and esp_ping.h
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 10 Sep 2018 04:21:59 +0000 (12:21 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Fri, 21 Sep 2018 06:09:37 +0000 (14:09 +0800)
Before LwIP was moved into a submodule, sntp and esp_ping were
available as the following includes:

#include "apps/sntp/sntp.h"
#include "esp_ping.h"

This commit makes header files available at the old location, and adds
a deprecation warning for sntp.h.

Closes https://github.com/espressif/esp-idf/issues/2392

components/esp32/esp_err_to_name.c
components/lwip/CMakeLists.txt
components/lwip/apps/ping/esp_ping.c
components/lwip/apps/ping/ping.c
components/lwip/component.mk
components/lwip/include/apps/esp_ping.h [moved from components/lwip/include/apps/ping/esp_ping.h with 100% similarity]
components/lwip/include_compat/apps/sntp/sntp.h [new file with mode: 0644]

index aee804b05327b987970a5351bf30819d216319b7..1044ebe05825bf7938a5d99b8bed80eb2c60b844 100644 (file)
@@ -4,8 +4,8 @@
 #if __has_include("soc/soc.h")
 #include "soc/soc.h"
 #endif
-#if __has_include("apps/ping/esp_ping.h")
-#include "apps/ping/esp_ping.h"
+#if __has_include("apps/esp_ping.h")
+#include "apps/esp_ping.h"
 #endif
 #if __has_include("esp32/ulp.h")
 #include "esp32/ulp.h"
@@ -399,7 +399,7 @@ static const esp_err_msg_t esp_err_msg_table[] = {
 #   ifdef      ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED
     ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED),     /* 20487 0x5007 */
 #   endif
-    // components/lwip/include/apps/ping/esp_ping.h
+    // components/lwip/include/apps/esp_ping.h
 #   ifdef      ESP_ERR_PING_BASE
     ERR_TBL_IT(ESP_ERR_PING_BASE),                          /* 24576 0x6000 */
 #   endif
index 794d5bc6a48ac20f1975e70bed3932bca680b206..29c8d9fb69d5a71de6fee411715b58709c728435 100644 (file)
@@ -3,6 +3,7 @@ set(COMPONENT_ADD_INCLUDEDIRS
     lwip/src/include
     port/esp32/include
     port/esp32/include/arch
+    include_compat
     )
 
 set(COMPONENT_SRCS "apps/dhcpserver/dhcpserver.c"
index 43e405f2402a23ccac3fad351c7918e1aad4113b..cae4c866b1f2335b46625f832231a97eddec1042 100644 (file)
@@ -13,7 +13,7 @@
 // limitations under the License.
 
 #include <string.h>
-#include "ping/esp_ping.h"
+#include "esp_ping.h"
 
 #include "lwip/ip_addr.h"
 
index eb7e71c60ee85c664ab44a75c4c7657b75b028ff..64b005749d227bd664b8631f49c30b87d18f3f13 100644 (file)
@@ -58,7 +58,7 @@
 #endif /* PING_USE_SOCKETS */
 
 #ifdef ESP_PING
-#include "ping/esp_ping.h"
+#include "esp_ping.h"
 #include "lwip/ip_addr.h"
 #endif
 /**
index e33ea7f368f31cf29f2d0dc721ed67ebed265f83..684a5794d584471bbc2e7d7047d8f962bde2e26c 100644 (file)
@@ -7,7 +7,8 @@ COMPONENT_ADD_INCLUDEDIRS := \
        include/apps \
        lwip/src/include \
        port/esp32/include \
-       port/esp32/include/arch
+       port/esp32/include/arch \
+       include_compat
 
 COMPONENT_SRCDIRS := \
        apps/dhcpserver \
diff --git a/components/lwip/include_compat/apps/sntp/sntp.h b/components/lwip/include_compat/apps/sntp/sntp.h
new file mode 100644 (file)
index 0000000..3db0fba
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+#warning "This header file is deprecated, please include lwip/apps/sntp.h instead."
+#include "lwip/apps/sntp.h"