Define _POSIX_C_SOURCE to be 200112L, as a minimum for C99.
Strict platforms cannot be expected to accept C99 code as valid when earlier standards versions are selected. This helps the programs build on Solaris-like platforms (e.g. illumos). Fixes #3420 Signed-off-by: nia <nia@netbsd.org>
This commit is contained in:
parent
5b66d44f5a
commit
1c0c837ddc
@ -22,7 +22,7 @@
|
|||||||
/* Enable definition of fileno() even when compiling with -std=c99. Must be
|
/* Enable definition of fileno() even when compiling with -std=c99. Must be
|
||||||
* set before config.h, which pulls in glibc's features.h indirectly.
|
* set before config.h, which pulls in glibc's features.h indirectly.
|
||||||
* Harmless on other platforms. */
|
* Harmless on other platforms. */
|
||||||
#define _POSIX_C_SOURCE 1
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "mbedtls/config.h"
|
#include "mbedtls/config.h"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
/* Enable definition of fileno() even when compiling with -std=c99. Must be
|
/* Enable definition of fileno() even when compiling with -std=c99. Must be
|
||||||
* set before config.h, which pulls in glibc's features.h indirectly.
|
* set before config.h, which pulls in glibc's features.h indirectly.
|
||||||
* Harmless on other platforms. */
|
* Harmless on other platforms. */
|
||||||
#define _POSIX_C_SOURCE 1
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "mbedtls/config.h"
|
#include "mbedtls/config.h"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
||||||
#if !defined(_POSIX_C_SOURCE)
|
#if !defined(_POSIX_C_SOURCE)
|
||||||
#define _POSIX_C_SOURCE 1 // for fileno() from <stdio.h>
|
#define _POSIX_C_SOURCE 200112L // for fileno() from <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user