diff --git a/libc/src/stdio/scanf_core/reader.h b/libc/src/stdio/scanf_core/reader.h index a545a605ff150..1f8ec9695a314 100644 --- a/libc/src/stdio/scanf_core/reader.h +++ b/libc/src/stdio/scanf_core/reader.h @@ -15,6 +15,11 @@ #include "src/__support/File/file.h" #endif +#if defined(LIBC_TARGET_ARCH_IS_GPU) +#include "src/stdio/getc.h" +#include "src/stdio/ungetc.h" +#endif + #include "src/__support/macros/attributes.h" // For LIBC_INLINE #include "src/__support/macros/config.h" diff --git a/libc/src/stdio/scanf_core/vfscanf_internal.h b/libc/src/stdio/scanf_core/vfscanf_internal.h index 84d074711b8fb..4e20fa3b93091 100644 --- a/libc/src/stdio/scanf_core/vfscanf_internal.h +++ b/libc/src/stdio/scanf_core/vfscanf_internal.h @@ -18,8 +18,6 @@ #if defined(LIBC_TARGET_ARCH_IS_GPU) #include "src/stdio/ferror.h" -#include "src/stdio/getc.h" -#include "src/stdio/ungetc.h" #endif #include "hdr/types/FILE.h"