linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] perf: Add missing sys/types.h include
@ 2023-01-04 19:34 Jesus Sanchez-Palencia
  0 siblings, 0 replies; only message in thread
From: Jesus Sanchez-Palencia @ 2023-01-04 19:34 UTC (permalink / raw)
  To: linux-perf-users
  Cc: Mark Rutland, Namhyung Kim, Jiri Olsa, Alexander Shishkin,
	Arnaldo Carvalho de Melo, Ian Rogers, linux-kernel,
	Jesus Sanchez-Palencia

Not all libc implementations define ssize_t as part of stdio.h like
glibc does since the standard only requires this type to be defined by
unistd.h and sys/types.h. For this reason the perf build is currently
broken for toolchains based on uClibc, for instance.

Include sys/types.h explicitly to fix that.

Fixes: 378ef0f5d9d7 ("perf build: Use libtraceevent from the system")
Signed-off-by: Jesus Sanchez-Palencia <jesussanp@google.com>
---
 tools/perf/util/trace-event.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index add6c5d9531c..9b3cd79cca12 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -4,6 +4,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <sys/types.h>
 #include <linux/types.h>
 
 struct evlist;
-- 
2.39.0.314.g84b9a713c41-goog


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-04 19:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 19:34 [PATCH v2] perf: Add missing sys/types.h include Jesus Sanchez-Palencia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).