libutil: Fix 32-bit build

In the expand_generic test case for expand_number(), leave out size_t
if it's not 64 bits wide.

Fixes:		ab1c6874e5
This commit is contained in:
Dag-Erling Smørgrav 2025-08-07 11:31:25 +02:00
parent df58e8b150
commit bd953a6026

View file

@ -251,7 +251,9 @@ ATF_TC_BODY(expand_generic, tp)
{
uint64_t uint64;
int64_t int64;
#ifdef __LP64__
size_t size;
#endif
off_t off;
ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &uint64));
@ -266,10 +268,12 @@ ATF_TC_BODY(expand_generic, tp)
ATF_REQUIRE_EQ(0, expand_number("-9223372036854775808", &int64));
ATF_REQUIRE_EQ(INT64_MIN, int64);
#ifdef __LP64__
ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &size));
ATF_REQUIRE_EQ(UINT64_MAX, size);
ATF_REQUIRE_EQ(-1, expand_number("-1", &size));
ATF_REQUIRE_EQ(ERANGE, errno);
#endif
ATF_REQUIRE_EQ(0, expand_number("9223372036854775807", &off));
ATF_REQUIRE_EQ(INT64_MAX, off);