Skip to contentSkip to conversation

lib: Fix compilation on old toolchains

PATCH New Petr Vorel 1 participant 1 message Jan 26, 2024 Library code

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 lib: Fix compilation on old toolchains

Some old toolchains require to add <linux/types.h> to fix:

tst_safe_io_uring.c: In function ‘safe_io_uring_init’:
tst_safe_io_uring.c:34:45: error: ‘__u32’ undeclared (first use in this function)
34 | params->sq_entries * sizeof(__u32);
| ^~~~~

Fixes 3f2ff5431 ("Add safe functions for io_uring to LTP library")
---
 lib/tst_safe_io_uring.c | 2 ++
 1 file changed, 2 insertions(+)
lib/tst_safe_io_uring.c +2 -0
index de6869f50..982a10bd4 100644
@@ -4,6 +4,8 @@
  */
 
 #define TST_NO_DEFAULT_MAIN
+
+#include <linux/types.h>
 #include "tst_test.h"
 #include "tst_safe_io_uring.h"
 
Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp