From 0ee8ea01bc16620bac8563ae5b3ad02098297641 Mon Sep 17 00:00:00 2001 From: Christos Longros <98426896+chrislongros@users.noreply.github.com> Date: Wed, 9 Sep 2026 20:17:23 +0200 Subject: [PATCH] FreeBSD: use sys/abi_compat.h for time32_t FreeBSD 14.5 defines time32_t in sys/abi_types.h. The SPL typedef now duplicates it, which breaks the -std=gnu99 module build on stable/14. Apply the same change as freebsd-src 87632ddf67b. Reviewed-by: Brian Behlendorf Signed-off-by: Christos Longros Closes #19059 --- include/os/freebsd/spl/sys/types32.h | 3 ++- lib/libspl/include/sys/types32.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/os/freebsd/spl/sys/types32.h b/include/os/freebsd/spl/sys/types32.h index 5b7131923460..cb2ef27cf933 100644 --- a/include/os/freebsd/spl/sys/types32.h +++ b/include/os/freebsd/spl/sys/types32.h @@ -30,9 +30,10 @@ #ifndef _SPL_TYPES32_H #define _SPL_TYPES32_H +#include + typedef uint32_t caddr32_t; typedef int32_t daddr32_t; -typedef int32_t time32_t; typedef uint32_t size32_t; #endif /* _SPL_TYPES32_H */ diff --git a/lib/libspl/include/sys/types32.h b/lib/libspl/include/sys/types32.h index 3acbc218c867..3734d58c4d2a 100644 --- a/lib/libspl/include/sys/types32.h +++ b/lib/libspl/include/sys/types32.h @@ -53,7 +53,12 @@ typedef uint32_t dev32_t; typedef int32_t pid32_t; typedef uint32_t size32_t; typedef int32_t ssize32_t; +#ifdef __FreeBSD__ +#include +#endif +#ifndef __HAVE_TIME32_T typedef int32_t time32_t; +#endif typedef int32_t clock32_t; typedef struct timespec32 {