diff --git a/components/tcpip_adapter/include/tcpip_adapter.h b/components/tcpip_adapter/include/tcpip_adapter.h index 6c110b88a..db23a2ae6 100644 --- a/components/tcpip_adapter/include/tcpip_adapter.h +++ b/components/tcpip_adapter/include/tcpip_adapter.h @@ -23,6 +23,10 @@ #include "tcpip_adapter_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief tcpip adapter legacy init. It is used only to set the compatibility mode of esp-netif, which * will enable backward compatibility of esp-netif. @@ -245,4 +249,8 @@ esp_err_t tcpip_adapter_get_hostname(tcpip_adapter_if_t tcpip_if, const char **h */ esp_err_t tcpip_adapter_set_default_wifi_handlers(void); +#ifdef __cplusplus +} // extern "C" +#endif + #endif //_TCPIP_ADAPTER_H_ diff --git a/components/tcpip_adapter/include/tcpip_adapter_compatible/tcpip_adapter_compat.h b/components/tcpip_adapter/include/tcpip_adapter_compatible/tcpip_adapter_compat.h index bf32bd81d..2ccf4a483 100644 --- a/components/tcpip_adapter/include/tcpip_adapter_compatible/tcpip_adapter_compat.h +++ b/components/tcpip_adapter/include/tcpip_adapter_compatible/tcpip_adapter_compat.h @@ -15,6 +15,10 @@ #ifndef _TCPIP_ADAPTER_COMPAT_H_ #define _TCPIP_ADAPTER_COMPAT_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief This function is called from ethernet driver init code to facilitate * autostart fo the driver in backward compatible tcpip_adapter way @@ -54,4 +58,8 @@ esp_err_t tcpip_adapter_set_default_wifi_handlers(void); */ esp_err_t tcpip_adapter_clear_default_wifi_handlers(void); +#ifdef __cplusplus +} // extern "C" +#endif + #endif //_TCPIP_ADAPTER_COMPAT_H_ diff --git a/components/tcpip_adapter/include/tcpip_adapter_types.h b/components/tcpip_adapter/include/tcpip_adapter_types.h index 59f637fc7..37daf4675 100644 --- a/components/tcpip_adapter/include/tcpip_adapter_types.h +++ b/components/tcpip_adapter/include/tcpip_adapter_types.h @@ -18,6 +18,11 @@ #include "lwip/ip_addr.h" #include "dhcpserver/dhcpserver.h" #include "esp_netif_sta_list.h" + +#ifdef __cplusplus +extern "C" { +#endif + // // Define compatible types if tcpip_adapter interface used // @@ -70,4 +75,8 @@ typedef esp_netif_dns_info_t tcpip_adapter_dns_info_t; typedef esp_netif_sta_list_t tcpip_adapter_sta_list_t; typedef esp_netif_sta_info_t tcpip_adapter_sta_info_t; +#ifdef __cplusplus +} // extern "C" +#endif + #endif // _TCPIP_ADAPTER_TYPES_H_ \ No newline at end of file