diff --git a/clang/lib/Headers/llvm_libc_wrappers/stdio.h b/clang/lib/Headers/llvm_libc_wrappers/stdio.h index 950f91b3763e8..bb319915adfa1 100644 --- a/clang/lib/Headers/llvm_libc_wrappers/stdio.h +++ b/clang/lib/Headers/llvm_libc_wrappers/stdio.h @@ -60,7 +60,25 @@ #pragma omp begin declare target -#include +#ifndef __LIBC_ATTRS +#define __LIBC_ATTRS +#endif + +#ifdef __cplusplus +extern "C" { +#endif +extern FILE *stderr; +__LIBC_ATTRS; + +extern FILE *stdin; +__LIBC_ATTRS; + +extern FILE *stdout; +__LIBC_ATTRS; + +#ifdef __cplusplus +} +#endif #pragma omp end declare target