Skip to contentSkip to conversation

sprintf.h requires stdarg.h

PATCH New Suchit Karunakaran 1 participant 1 message Jul 25, 2025 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sprintf.h requires stdarg.h

From: Stephen Rothwell <[email protected]>

In file included from drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs_utils.c:4:
include/linux/sprintf.h:11:54: error: unknown type name 'va_list'
11 | __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
| ^~~~~~~
include/linux/sprintf.h:1:1: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'

Fixes 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends")
Cc Andriy Shevchenko <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Rasmus Villemoes <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
---
 include/linux/sprintf.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/sprintf.h +1 -0
index 51cab2def9ec..876130091384 100644
@@ -4,6 +4,7 @@
 
 #include <linux/compiler_attributes.h>
 #include <linux/types.h>
+#include <linux/stdarg.h>
 
 int num_to_str(char *buf, int size, unsigned long long num, unsigned int width);
 
Signature · 1 line
2.39.5