[libc-commits] [libc] b187ecb - [libc] fix baremetal getchar (#98515)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 11 11:36:26 PDT 2024


Author: Michael Jones
Date: 2024-07-11T11:36:22-07:00
New Revision: b187ecb6ab05c12eea2e96ee56e2ed805744507b

URL: https://github.com/llvm/llvm-project/commit/b187ecb6ab05c12eea2e96ee56e2ed805744507b
DIFF: https://github.com/llvm/llvm-project/commit/b187ecb6ab05c12eea2e96ee56e2ed805744507b.diff

LOG: [libc] fix baremetal getchar (#98515)

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

Added: 
    

Modified: 
    libc/src/stdio/baremetal/CMakeLists.txt
    libc/src/stdio/baremetal/getchar.cpp

Removed: 
    


################################################################################
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 {
 


        


More information about the libc-commits mailing list