Skip to content

Commit 6f14edc

Browse files
Add the right guards
1 parent 82ccee6 commit 6f14edc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libc/src/stdio/scanf_core/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ add_header_library(
7171
libc.src.__support.macros.attributes
7272
libc.hdr.types.FILE
7373
libc.src.__support.File.file
74-
COMPILE_OPTIONS
75-
${use_system_file}
74+
${use_system_file}
7675
)
7776
endif()
7877

@@ -129,7 +128,6 @@ elseif(TARGET libc.src.__support.File.file OR (NOT LLVM_LIBC_FULL_BUILD))
129128
libc.include.stdio
130129
libc.src.__support.File.file
131130
libc.src.__support.arg_list
132-
COMPILE_OPTIONS
133131
${use_system_file}
134132
)
135133
endif()

libc/src/stdio/scanf_core/reader.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
#define LLVM_LIBC_SRC_STDIO_SCANF_CORE_READER_H
1111

1212
#include "hdr/types/FILE.h"
13+
14+
#ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE
1315
#include "src/__support/File/file.h"
16+
#endif
17+
1418
#include "src/__support/macros/attributes.h" // For LIBC_INLINE
1519
#include "src/__support/macros/config.h"
1620

0 commit comments

Comments
 (0)