From 737fce72cce6097a7f55b558f4798ec931fa5057 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 363154f68..7f5d67a46 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