Sfoglia il codice sorgente

Merge branch 'bugfix/lwip_netdb_cpp_guards_v4.0' into 'release/v4.0'

lw-IP: Changed to C linkage in netdb.h for fixing bug when using mixed C/C++ code (v4.0)

See merge request espressif/esp-idf!11091
Jiang Jiang Jian 5 anni fa
parent
commit
71eb7604c5
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      components/lwip/port/esp32/include/netdb.h

+ 8 - 0
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