[libc-commits] [libc] [libc] Remove unnecessary include from putchar.h (PR #95576)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Jun 14 10:41:27 PDT 2024


https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/95576

The putchar header was including the public stdio.h. It doesn't need to
do that and it was causing build failures for downstream baremetal users
so this patch fixes it.

>From 908018b9445b66aec9176004c91a974f5d20b23c Mon Sep 17 00:00:00 2001
From: Michael Jones <michaelrj at google.com>
Date: Fri, 14 Jun 2024 10:40:12 -0700
Subject: [PATCH] [libc] Remove unnecessary include from putchar.h

The putchar header was including the public stdio.h. It doesn't need to
do that and it was causing build failures for downstream baremetal users
so this patch fixes it.
---
 libc/src/stdio/putchar.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libc/src/stdio/putchar.h b/libc/src/stdio/putchar.h
index 99a7453efb11d..e458e3179ed6b 100644
--- a/libc/src/stdio/putchar.h
+++ b/libc/src/stdio/putchar.h
@@ -9,8 +9,6 @@
 #ifndef LLVM_LIBC_SRC_STDIO_PUTCHAR_H
 #define LLVM_LIBC_SRC_STDIO_PUTCHAR_H
 
-#include <stdio.h>
-
 namespace LIBC_NAMESPACE {
 
 int putchar(int c);



More information about the libc-commits mailing list