All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf print_insn: Include sys/types.h for ssize_t
@ 2026-10-26 17:45 Florian Fainelli
  2026-10-26 17:48 ` sashiko-bot
  2026-10-26 18:27 ` James Clark
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2026-10-26 17:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	James Clark, Andi Kleen, open list:PERFORMANCE EVENTS SUBSYSTEM

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@broadcom.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf print_insn: Include sys/types.h for ssize_t
  2026-10-26 17:45 [PATCH] perf print_insn: Include sys/types.h for ssize_t Florian Fainelli
@ 2026-10-26 17:48 ` sashiko-bot
  2026-10-26 18:27 ` James Clark
  1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-10-26 17:48 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: open list:PERFORMANCE EVENTS SUBSYSTEM

> 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@broadcom.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261026174535.3157580-1-florian.fainelli@broadcom.com?part=1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf print_insn: Include sys/types.h for ssize_t
  2026-10-26 17:45 [PATCH] perf print_insn: Include sys/types.h for ssize_t Florian Fainelli
  2026-10-26 17:48 ` sashiko-bot
@ 2026-10-26 18:27 ` James Clark
  2026-10-27 20:39   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 4+ messages in thread
From: James Clark @ 2026-10-26 18:27 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Andi Kleen,
	open list:PERFORMANCE EVENTS SUBSYSTEM



On 26/10/2026 17:45, Florian Fainelli wrote:
> 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@broadcom.com>
> ---
>   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>
>   

Reviewed-by: James Clark <james.clark@linaro.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf print_insn: Include sys/types.h for ssize_t
  2026-10-26 18:27 ` James Clark
@ 2026-10-27 20:39   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-10-27 20:39 UTC (permalink / raw)
  To: James Clark
  Cc: Florian Fainelli, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Andi Kleen,
	open list:PERFORMANCE EVENTS SUBSYSTEM

On Mon, Oct 26, 2026 at 06:27:25PM +0000, James Clark wrote:
> On 26/10/2026 17:45, Florian Fainelli wrote:
> > +++ 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>
> 
> Reviewed-by: James Clark <james.clark@linaro.org>

Thanks, applied for v7.4.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-27 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 17:45 [PATCH] perf print_insn: Include sys/types.h for ssize_t Florian Fainelli
2026-10-26 17:48 ` sashiko-bot
2026-10-26 18:27 ` James Clark
2026-10-27 20:39   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.