mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
Merge branch 'bugfix/lwip_netdb_cpp_guards_v4.2' into 'release/v4.2'
lw-IP: Changed to C linkage in netdb.h for fixing bug when using mixed C/C++ code (v4.2) See merge request espressif/esp-idf!11089
This commit is contained in:
@ -32,9 +32,17 @@
|
|||||||
|
|
||||||
#include "lwip/netdb.h"
|
#include "lwip/netdb.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
int getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
|
int getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
|
||||||
char *host, socklen_t hostlen,
|
char *host, socklen_t hostlen,
|
||||||
char *serv, socklen_t servlen, int flags);
|
char *serv, socklen_t servlen, int flags);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -195,7 +195,7 @@ class PublicHeaderChecker:
|
|||||||
raise HeaderFailedBuildError()
|
raise HeaderFailedBuildError()
|
||||||
|
|
||||||
def preprocess_one_header(self, header, num, ignore_sdkconfig_issue=False):
|
def preprocess_one_header(self, header, num, ignore_sdkconfig_issue=False):
|
||||||
all_compilation_flags = ["-w", "-P", "-E", "-include", header, self.main_c] + self.include_dir_flags
|
all_compilation_flags = ["-w", "-P", "-E", "-DESP_PLATFORM", "-include", header, self.main_c] + self.include_dir_flags
|
||||||
if not ignore_sdkconfig_issue:
|
if not ignore_sdkconfig_issue:
|
||||||
# just strip commnets to check for CONFIG_... macros
|
# just strip commnets to check for CONFIG_... macros
|
||||||
rc, out, err = exec_cmd([self.gcc, "-fpreprocessed", "-dD", "-P", "-E", header] + self.include_dir_flags)
|
rc, out, err = exec_cmd([self.gcc, "-fpreprocessed", "-dD", "-P", "-E", header] + self.include_dir_flags)
|
||||||
|
Reference in New Issue
Block a user