Check if feature macro is defined before define it
Zephyr's native posix port define _POSIX_C_SOURCE with a higher value during the build, so when mbedTLS defines it with a different value breaks the build. As Zephyr is already defining a higher value is guaranteed that mbedTLS required features will be available. So, just define it in case it was not defined before. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com> Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
f482bbddeb
commit
711fe7fdff
|
@ -20,7 +20,9 @@
|
|||
/* Enable definition of getaddrinfo() even when compiling with -std=c99. Must
|
||||
* be set before config.h, which pulls in glibc's features.h indirectly.
|
||||
* Harmless on other platforms. */
|
||||
#if !defined(_POSIX_C_SOURCE)
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#endif
|
||||
#define _XOPEN_SOURCE 600 /* sockaddr_storage */
|
||||
|
||||
#include "common.h"
|
||||
|
|
Loading…
Reference in New Issue