From 02eff0f2968af897e3856b7a86952b96ba60d034 Mon Sep 17 00:00:00 2001 From: Jens Reidel Date: Wed, 2 Jul 2025 03:49:03 +0200 Subject: [PATCH] musl: mips64: Fix type of nlink_t musl defines nlink_t to be an unsigned 32-bit integer on mips64, therefore changing the size of stat64 from 216 bytes to 208. The current definition in the libc crate does not match this and therefore defines stat64 wrong on mips64 musl, which results in bogus readings of fields following st_nlink. See https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/alltypes.h.in#n22 for the musl definition of nlink_t. Signed-off-by: Jens Reidel --- src/unix/linux_like/linux/musl/b64/mips64.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 5cef57239fda9..5f978f373983b 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -4,7 +4,7 @@ use crate::prelude::*; pub type wchar_t = i32; pub type __u64 = c_ulong; pub type __s64 = c_long; -pub type nlink_t = u64; +pub type nlink_t = c_uint; pub type blksize_t = i64; s! {