From afcb6bdf8ad1aecef93fda3ee8e1908f5bae3e55 Mon Sep 17 00:00:00 2001 From: 04cb <0x04cb@gmail.com> Date: Sun, 1 Mar 2026 12:04:16 +0800 Subject: [PATCH] Fix suseconds_t type signedness for Linux ABI compatibility Per Linux kernel ABI, suseconds_t should be signed (i32/i64) not unsigned (u32/u64). This matches the kernel definition where __kernel_suseconds_t is __kernel_long_t (signed long). Fixes #608 Co-Authored-By: Claude Opus 4.6 --- litebox_common_linux/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litebox_common_linux/src/lib.rs b/litebox_common_linux/src/lib.rs index 9986ef105..e20271ff5 100644 --- a/litebox_common_linux/src/lib.rs +++ b/litebox_common_linux/src/lib.rs @@ -771,10 +771,10 @@ pub struct Ucred { cfg_if::cfg_if! { if #[cfg(all(target_arch = "x86"))] { pub type time_t = i32; - pub type suseconds_t = u32; + pub type suseconds_t = i32; } else if #[cfg(all(target_arch = "x86_64"))] { pub type time_t = i64; - pub type suseconds_t = u64; + pub type suseconds_t = i64; } else { compile_error!("Unsupported architecture"); }