Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] fix baremetal getchar #98515

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

michaelrj-google
Copy link
Contributor

baremetal getchar got the wrong find/replace in the initial patch. This
patch fixes it.

baremetal getchar got the wrong find/replace in the initial patch. This
patch fixes it.
@llvmbot llvmbot added the libc label Jul 11, 2024
@michaelrj-google michaelrj-google merged commit b187ecb into llvm:main Jul 11, 2024
6 of 7 checks passed
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 11, 2024

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

Changes

baremetal getchar got the wrong find/replace in the initial patch. This
patch fixes it.


Full diff: https://github.com/llvm/llvm-project/pull/98515.diff

2 Files Affected:

  • (modified) libc/src/stdio/baremetal/CMakeLists.txt (+1-1)
  • (modified) libc/src/stdio/baremetal/getchar.cpp (+1-1)
diff --git a/libc/src/stdio/baremetal/CMakeLists.txt b/libc/src/stdio/baremetal/CMakeLists.txt
index 9bfd5eb2ae0ee..c5cf4a8e0e5b5 100644
--- a/libc/src/stdio/baremetal/CMakeLists.txt
+++ b/libc/src/stdio/baremetal/CMakeLists.txt
@@ -5,7 +5,7 @@ add_entrypoint_object(
   HDRS
     ../getchar.h
   DEPENDS
-    libc.include.stdio
+    libc.hdr.stdio_macros
     libc.src.__support.OSUtil.osutil
     libc.src.__support.CPP.string_view
 )
diff --git a/libc/src/stdio/baremetal/getchar.cpp b/libc/src/stdio/baremetal/getchar.cpp
index 0cd7c59b495dd..01a5a587e5bce 100644
--- a/libc/src/stdio/baremetal/getchar.cpp
+++ b/libc/src/stdio/baremetal/getchar.cpp
@@ -9,7 +9,7 @@
 #include "src/stdio/getchar.h"
 #include "src/__support/OSUtil/io.h"
 
-#include "hdr/types/FILE.h"
+#include "hdr/stdio_macros.h" // for EOF.
 
 namespace LIBC_NAMESPACE {
 

aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
baremetal getchar got the wrong find/replace in the initial patch. This
patch fixes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants