Skip to content

Commit 9ba9e48

Browse files
authored
[libc] Mark external baremetal I/O symbols as extern "C" (#98871)
These need to use C ABI.
1 parent 4420c57 commit 9ba9e48

File tree

1 file changed

+3
-3
lines changed
  • libc/src/__support/OSUtil/baremetal

1 file changed

+3
-3
lines changed

libc/src/__support/OSUtil/baremetal/io.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ namespace LIBC_NAMESPACE_DECL {
4444

4545
struct __llvm_libc_stdio_cookie;
4646

47-
extern struct __llvm_libc_stdio_cookie __llvm_libc_stdin_cookie;
48-
extern struct __llvm_libc_stdio_cookie __llvm_libc_stdout_cookie;
49-
extern struct __llvm_libc_stdio_cookie __llvm_libc_stderr_cookie;
47+
extern "C" struct __llvm_libc_stdio_cookie __llvm_libc_stdin_cookie;
48+
extern "C" struct __llvm_libc_stdio_cookie __llvm_libc_stdout_cookie;
49+
extern "C" struct __llvm_libc_stdio_cookie __llvm_libc_stderr_cookie;
5050

5151
extern "C" ssize_t __llvm_libc_stdio_read(void *cookie, char *buf, size_t size);
5252
extern "C" ssize_t __llvm_libc_stdio_write(void *cookie, const char *buf,

0 commit comments

Comments
 (0)