diff options
| author | millert <> | 2023-10-29 14:26:13 +0000 |
|---|---|---|
| committer | millert <> | 2023-10-29 14:26:13 +0000 |
| commit | 0818a58d9b3218e98640cc0b19181d9015c432ea (patch) | |
| tree | f3a2eb93c34df84d018f6bd2719a40ee299e9023 /src/lib/libc | |
| parent | f6027bb621e5a1dbaa9e924edbe6ecb931b94aba (diff) | |
| download | openbsd-0818a58d9b3218e98640cc0b19181d9015c432ea.tar.gz openbsd-0818a58d9b3218e98640cc0b19181d9015c432ea.tar.bz2 openbsd-0818a58d9b3218e98640cc0b19181d9015c432ea.zip | |
Enable ISO C11 APIs when building libc, even with an older compiler.
Otherwise, the prototypes for timespec_get() and aligned_alloc()
are not visible. OK guenther@
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/include/namespace.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h index b42c00e4a1..8503de47be 100644 --- a/src/lib/libc/include/namespace.h +++ b/src/lib/libc/include/namespace.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: namespace.h,v 1.15 2019/11/25 22:57:28 guenther Exp $ */ | 1 | /* $OpenBSD: namespace.h,v 1.16 2023/10/29 14:26:13 millert Exp $ */ |
| 2 | 2 | ||
| 3 | #ifndef _LIBC_NAMESPACE_H_ | 3 | #ifndef _LIBC_NAMESPACE_H_ |
| 4 | #define _LIBC_NAMESPACE_H_ | 4 | #define _LIBC_NAMESPACE_H_ |
| @@ -20,6 +20,14 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * ISO C11 or higher is required to build libc. | ||
| 24 | * This must come _before_ sys/cdefs.h is included. | ||
| 25 | */ | ||
| 26 | #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112 | ||
| 27 | #define _ISOC11_SOURCE 1 | ||
| 28 | #endif | ||
| 29 | |||
| 30 | /* | ||
| 23 | * For explanations of how to use these, see README | 31 | * For explanations of how to use these, see README |
| 24 | * For explanations of why we use them and how they work, see DETAILS | 32 | * For explanations of why we use them and how they work, see DETAILS |
| 25 | */ | 33 | */ |
