summaryrefslogtreecommitdiff
path: root/lib/ktl/include/cstdio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ktl/include/cstdio')
-rw-r--r--lib/ktl/include/cstdio21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ktl/include/cstdio b/lib/ktl/include/cstdio
new file mode 100644
index 0000000..349e736
--- /dev/null
+++ b/lib/ktl/include/cstdio
@@ -0,0 +1,21 @@
+// Copyright 2020 The Fuchsia Authors
+//
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file or at
+// https://opensource.org/licenses/MIT
+
+#ifndef ZIRCON_KERNEL_LIB_KTL_INCLUDE_CSTDIO_
+#define ZIRCON_KERNEL_LIB_KTL_INCLUDE_CSTDIO_
+
+// The kernel doesn't want this file but some libc++ headers we need
+// wind up including it and they need these declarations.
+//
+// Note this specifically avoids <stdio.h> because libc++ doesn't need that
+// but <string_view> indirectly reaches <cstdio> and the kernel's <stdio.h>
+// uses <ktl/string_view.h> so there would be a circularity.
+
+#include <wchar.h>
+
+#define EOF (-1)
+
+#endif // ZIRCON_KERNEL_LIB_KTL_INCLUDE_CSTDIO_