[libc-commits] [libc] [libc] Fix missing errno include in fuzzer (PR #144132)

via libc-commits libc-commits at lists.llvm.org
Fri Jun 13 10:57:50 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

<details>
<summary>Changes</summary>

The printf parser uses errno for setting up the %m conversion. It was
presumably getting this include indirectly until a recent change. This
patch adds a direct dependency to fix it.


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


1 Files Affected:

- (modified) libc/fuzzing/stdio/CMakeLists.txt (+1) 


``````````diff
diff --git a/libc/fuzzing/stdio/CMakeLists.txt b/libc/fuzzing/stdio/CMakeLists.txt
index 8f89baa702000..401785a30469c 100644
--- a/libc/fuzzing/stdio/CMakeLists.txt
+++ b/libc/fuzzing/stdio/CMakeLists.txt
@@ -4,6 +4,7 @@ add_libc_fuzzer(
     printf_parser_fuzz.cpp
   DEPENDS
     libc.src.stdio.printf_core.parser
+    libc.src.errno.errno # needed for the strerror conversion
 )
 
 add_libc_fuzzer(

``````````

</details>


https://github.com/llvm/llvm-project/pull/144132


More information about the libc-commits mailing list