Skip to contentSkip to conversation

perf: Add missing sys/types.h include

PATCH New Jesus Sanchez-Palencia 1 participant 1 message Jan 4, 2023 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf: Add missing sys/types.h include

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")
---
 tools/perf/util/trace-event.h | 1 +
 1 file changed, 1 insertion(+)
tools/perf/util/trace-event.h +1 -0
index add6c5d9531c..9b3cd79cca12 100644
@@ -4,6 +4,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <sys/types.h>
 #include <linux/types.h>
 
 struct evlist;
Signature · 1 line
2.39.0.314.g84b9a713c41-goog