From 8a102926f8bc74d180c61d913a69310f652dd1d6 Mon Sep 17 00:00:00 2001 From: mathiasbredholt Date: Thu, 24 Sep 2020 09:28:51 +0200 Subject: [PATCH] lwip: Changed to C linkage for fixing bug when using mixed C/C++ code Merges https://github.com/espressif/esp-idf/pull/5900 --- components/lwip/port/esp32/include/netdb.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/lwip/port/esp32/include/netdb.h b/components/lwip/port/esp32/include/netdb.h index 363154f68893..7f5d67a4652a 100644 --- a/components/lwip/port/esp32/include/netdb.h +++ b/components/lwip/port/esp32/include/netdb.h @@ -32,9 +32,17 @@ #include "lwip/netdb.h" +#ifdef __cplusplus +extern "C" { +#endif + #ifdef ESP_PLATFORM int getnameinfo(const struct sockaddr *addr, socklen_t addrlen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags); #endif + +#ifdef __cplusplus +} +#endif