[LTP] [PATCH 1/1] lib: Fix compilation on old toolchains

Petr Vorel pvorel@suse.cz
Fri Jan 26 11:54:55 CET 2024


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")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_safe_io_uring.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/tst_safe_io_uring.c b/lib/tst_safe_io_uring.c
index de6869f50..982a10bd4 100644
--- a/lib/tst_safe_io_uring.c
+++ b/lib/tst_safe_io_uring.c
@@ -4,6 +4,8 @@
  */
 
 #define TST_NO_DEFAULT_MAIN
+
+#include <linux/types.h>
 #include "tst_test.h"
 #include "tst_safe_io_uring.h"
 
-- 
2.43.0



More information about the ltp mailing list