The branch stable/15 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5ae9aac0c7d819556a1cf2ec7bf61b78740d4917

commit 5ae9aac0c7d819556a1cf2ec7bf61b78740d4917
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-02-06 23:47:13 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-02-21 21:34:08 +0000

    openzfs sys/types32.h: use abi_compat.h for time32_t
    
    (cherry picked from commit 87632ddf67b01f3d4787d10332afc1eeece52e2d)
---
 sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h | 3 ++-
 sys/contrib/openzfs/lib/libspl/include/sys/types32.h     | 5 +++++
 sys/sys/abi_compat.h                                     | 7 ++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h 
b/sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h
index 5b7131923460..cb2ef27cf933 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h
@@ -30,9 +30,10 @@
 #ifndef _SPL_TYPES32_H
 #define        _SPL_TYPES32_H
 
+#include <sys/abi_compat.h>
+
 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/sys/contrib/openzfs/lib/libspl/include/sys/types32.h 
b/sys/contrib/openzfs/lib/libspl/include/sys/types32.h
index 1bcae20187ad..850435b29f2a 100644
--- a/sys/contrib/openzfs/lib/libspl/include/sys/types32.h
+++ b/sys/contrib/openzfs/lib/libspl/include/sys/types32.h
@@ -63,7 +63,12 @@ typedef      uint32_t        dev32_t;
 typedef        int32_t         pid32_t;
 typedef        uint32_t        size32_t;
 typedef        int32_t         ssize32_t;
+#ifdef __FreeBSD__
+#include <sys/abi_compat.h>
+#endif
+#ifndef __HAVE_TIME32_T
 typedef        int32_t         time32_t;
+#endif
 typedef        int32_t         clock32_t;
 
 typedef struct timespec32 {
diff --git a/sys/sys/abi_compat.h b/sys/sys/abi_compat.h
index 69fb349edc7a..f190dcda9b68 100644
--- a/sys/sys/abi_compat.h
+++ b/sys/sys/abi_compat.h
@@ -52,11 +52,16 @@ typedef struct {
 #endif
 } freebsd32_uint64_t;
 
-#ifdef __amd64__
+#if __SIZEOF_LONG__ == 8
+#if defined __amd64__
 typedef        __int32_t       time32_t;
 #else
 typedef        __int64_t       time32_t;
 #endif
+#else
+typedef        __int32_t       time32_t;
+#endif
+#define        __HAVE_TIME32_T
 
 #define        PTRIN(v)        (void *)(uintptr_t)(v)
 #define        PTROUT(v)       (uintptr_t)(v)

Reply via email to