Re: git: 07c4eb506be4 - main - sys/compat/freebsd32: Fix i386 compilation

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Sat, 14 Feb 2026 05:19:54 UTC
On Fri, Feb 13, 2026 at 10:22:19PM +0000, Olivier Certner wrote:
> The branch main has been updated by olce:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=07c4eb506be45a4b836665e14ad63034ef3d573a
> 
> commit 07c4eb506be45a4b836665e14ad63034ef3d573a
> Author:     Olivier Certner <olce@FreeBSD.org>
> AuthorDate: 2026-02-13 16:37:21 +0000
> Commit:     Olivier Certner <olce@FreeBSD.org>
> CommitDate: 2026-02-13 22:21:51 +0000
> 
>     sys/compat/freebsd32: Fix i386 compilation
>     
>     The compile assertion now failing is due to the change '__int64_t' =>
>     '__int32_t' as the type of 'time32_t' on i386, which is the correct
>     value.  The use of 'freebsd32.h' on i386 may seem strange, but it comes
>     from 'kern_umtx.c' including it unconditionally as it needs 'struct
>     umutex32'.
So this is probably the wrong direction, it is not going to scale.
If the issue is with userspace (kdump and some test), then perhaps we should
only turn on _WANT_KEVENT32 for LP64, in these sources?

>     
>     Fixes:          87632ddf67b0 ("openzfs sys/types32.h: use abi_compat.h for time32_t")
>     Sponsored by:   The FreeBSD Foundation
> ---
>  sys/compat/freebsd32/freebsd32.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
> index e746a6e027ec..5210ce55b228 100644
> --- a/sys/compat/freebsd32/freebsd32.h
> +++ b/sys/compat/freebsd32/freebsd32.h
> @@ -74,7 +74,7 @@ struct ffclock_estimate32 {
>  __attribute__((packed))
>  #endif
>  ;
> -#if defined(__amd64__)
> +#if defined(__amd64__) || defined(__i386__)
>  _Static_assert(sizeof(struct ffclock_estimate32) == 52, "ffclock_estimate32 size");
>  #else
>  _Static_assert(sizeof(struct ffclock_estimate32) == 56, "ffclock_estimate32 size");