From 96041b5035b5f2e68165489dbaeda05ce1a68929 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 25 Jul 2025 10:35:11 -0700 Subject: [PATCH] linux/musl: Make time_t and suseconds_t 64-bit on all musl platforms time_t and suseconds_t are defined as 64-bit quanity on musl systems regardless of 32bit or 64bit CPU word length grep "_Int64" in musl tree shows this arch/aarch64/bits/alltypes.h.in:#define _Int64 long arch/arm/bits/alltypes.h.in:#define _Int64 long long arch/i386/bits/alltypes.h.in:#define _Int64 long long arch/loongarch64/bits/alltypes.h.in:#define _Int64 long arch/m68k/bits/alltypes.h.in:#define _Int64 long long arch/microblaze/bits/alltypes.h.in:#define _Int64 long long arch/mips/bits/alltypes.h.in:#define _Int64 long long arch/mips64/bits/alltypes.h.in:#define _Int64 long arch/mipsn32/bits/alltypes.h.in:#define _Int64 long long arch/or1k/bits/alltypes.h.in:#define _Int64 long long arch/powerpc/bits/alltypes.h.in:#define _Int64 long long arch/powerpc64/bits/alltypes.h.in:#define _Int64 long arch/riscv32/bits/alltypes.h.in:#define _Int64 long long arch/riscv64/bits/alltypes.h.in:#define _Int64 long arch/s390x/bits/alltypes.h.in:#define _Int64 long arch/sh/bits/alltypes.h.in:#define _Int64 long long arch/x32/bits/alltypes.h.in:#define _Int64 long long arch/x86_64/bits/alltypes.h.in:#define _Int64 long include/alltypes.h.in:TYPEDEF _Int64 time_t; include/alltypes.h.in:TYPEDEF _Int64 suseconds_t; Signed-off-by: Khem Raj --- src/unix/linux_like/linux/musl/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 2d93282b2deca..f28812212e1c4 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -12,8 +12,8 @@ pub type clock_t = c_long; See #1848 for more info." ) )] -pub type time_t = c_long; -pub type suseconds_t = c_long; +pub type time_t = i64; +pub type suseconds_t = i64; pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64;