Skip to contentSkip to conversation

libapi: Add missing linux/types.h header to get the __u64 type on io.h

PATCH In review Arnaldo Carvalho de Melo 2 participants 2 messages Nov 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libapi: Add missing linux/types.h header to get the __u64 type on io.h

There are functions using __u64, so we need to have the linux/types.h header otherwise we'll break when its not included before api/io.h.

Fixes e95770af4c4a280f ("tools api: Add a lightweight buffered reading api")
Cc Ian Rogers <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/lib/api/io.h | 1 +
 1 file changed, 1 insertion(+)
tools/lib/api/io.h +1 -0
index a77b74c5fb655a8c..2a7fe9758813172d 100644
@@ -12,6 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <linux/types.h>
 
 struct io {
 	/* File descriptor being read/ */
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnaldo Carvalho de Melo

There are functions using __u64, so we need to have the linux/types.h header otherwise we'll break when its not included before api/io.h.

Fixes e95770af4c4a280f ("tools api: Add a lightweight buffered reading api")
Cc Ian Rogers <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>

Thanks,
Ian

Quoted 19 lines
---
 tools/lib/api/io.h | 1 +
 1 file changed, 1 insertion(+)
tools/lib/api/io.h +1 -1
index a77b74c5fb655a8c..2a7fe9758813172d 100644
@@ -12,6 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <linux/types.h>
 
 struct io {
        /* File descriptor being read/ */
--

2.41.0