From 827fa1ee09d37d071dd9b02fec5b6fc9a7d51676 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 20 Feb 2025 10:43:25 -0800 Subject: [PATCH] [libc] Fix missing includes in GPU scanf reader In #121215 the reader was reorganized and the definitions of the internal getc and ungetc functions were moved, but the includes that the GPU builder depends on were not. This patch moves the includes to the correct new place. --- libc/src/stdio/scanf_core/reader.h | 5 +++++ libc/src/stdio/scanf_core/vfscanf_internal.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) 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"