From 52590bd2ffaf7758ba09152d32b558de3a6d90c9 Mon Sep 17 00:00:00 2001 From: no92 Date: Tue, 2 Jan 2024 17:53:41 +0100 Subject: [PATCH] options/posix: revert useconds_t downsizing on 64-bit architectures --- options/posix/include/unistd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/options/posix/include/unistd.h b/options/posix/include/unistd.h index 26f407d8f5..4cc750763a 100644 --- a/options/posix/include/unistd.h +++ b/options/posix/include/unistd.h @@ -305,7 +305,11 @@ extern int optopt; #endif /* !__MLIBC_ABI_ONLY */ // Non-POSIX functions supported by Linux. -typedef unsigned useconds_t; +#if UINTPTR_MAX == UINT64_MAX +typedef __mlibc_uint64 useconds_t; +#else +typedef __mlibc_uint32 useconds_t; +#endif #ifndef __MLIBC_ABI_ONLY