[PATCH] perf print_insn: Include sys/types.h for ssize_t

From: Florian Fainelli

Date: Mon Oct 26 2026 - 13:47:27 EST


print_insn.h declares fprintf_insn_asm() with an ssize_t return type but
does not include the header defining that type. This causes builds where
stdio.h does not provide ssize_t to fail when compiling util/print_insn.c:

util/print_insn.h:21:1: error: unknown type name 'ssize_t'

Include sys/types.h so the header provides its own dependency for ssize_t.

Fixes: 218c200f677d ("perf script: Consolidate capstone print functions")
Signed-off-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
---
tools/perf/util/print_insn.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/print_insn.h b/tools/perf/util/print_insn.h
index cefa5c5f246e..3de9438af9cd 100644
--- a/tools/perf/util/print_insn.h
+++ b/tools/perf/util/print_insn.h
@@ -4,6 +4,7 @@

#include <stddef.h>
#include <stdio.h>
+#include <sys/types.h>

#include <linux/types.h>

--
2.53.0