summaryrefslogtreecommitdiff
path: root/src/lib/libc/include
diff options
context:
space:
mode:
authormillert <>2023-10-29 14:26:13 +0000
committermillert <>2023-10-29 14:26:13 +0000
commite961968230ef9656870099b75ce61f5a340c5b06 (patch)
treef3a2eb93c34df84d018f6bd2719a40ee299e9023 /src/lib/libc/include
parent1614f91f69f2f60af24bd0a632e800ba8567a146 (diff)
downloadopenbsd-e961968230ef9656870099b75ce61f5a340c5b06.tar.gz
openbsd-e961968230ef9656870099b75ce61f5a340c5b06.tar.bz2
openbsd-e961968230ef9656870099b75ce61f5a340c5b06.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/include')
-rw-r--r--src/lib/libc/include/namespace.h10
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 */