Skip to contentSkip to conversation

dio_sparse: Fix compilation on alternative libc

PATCH New Cyril Hrubis 1 participant 1 message Dec 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dio_sparse: Fix compilation on alternative libc

The LONG_LONG_MAX is not actually correct macro for the long long limits it should have been LLONG_MAX. Actually I do not have idea where this comes from on my system, but the test fails to compile on Alpine with musl.

---
 testcases/kernel/io/ltp-aiodio/dio_sparse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
testcases/kernel/io/ltp-aiodio/dio_sparse.c +3 -3
index 7a76f4c16..929adbfba 100644
@@ -69,13 +69,13 @@ static void setup(void)
 	if (tst_parse_int(str_numchildren, &numchildren, 1, INT_MAX))
 		tst_brk(TBROK, "Invalid number of children '%s'", str_numchildren);
 
-	if (tst_parse_filesize(str_writesize, &writesize, 1, LONG_LONG_MAX))
+	if (tst_parse_filesize(str_writesize, &writesize, 1, LLONG_MAX))
 		tst_brk(TBROK, "Invalid write blocks size '%s'", str_writesize);
 
-	if (tst_parse_filesize(str_filesize, &filesize, 1, LONG_LONG_MAX))
+	if (tst_parse_filesize(str_filesize, &filesize, 1, LLONG_MAX))
 		tst_brk(TBROK, "Invalid file size '%s'", str_filesize);
 
-	if (tst_parse_filesize(str_offset, &offset, 0, LONG_LONG_MAX))
+	if (tst_parse_filesize(str_offset, &offset, 0, LLONG_MAX))
 		tst_brk(TBROK, "Invalid file offset '%s'", str_offset);
 
 	SAFE_STAT(".", &sb);
Signature · 5 lines
2.32.0


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