aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2026-02-18 18:45:26 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2026-02-18 18:45:26 +0000
commit45c1e44779e3d365f5e31f75546d48ce34e4ee05 (patch)
tree2da6c1951d9fd0b9304116a510a481e85bd78dd9
parentd5404462f691230423dc8cc543c6fdc44f34ec31 (diff)
Merge commit bfb276e55c76 from upstream OpenZFS (by Jessica Clarke)
Once upon a time, 32-bit PowerPC did indeed have a 32-bit time_t, but FreeBSD 12.0 switched to a 64-bit time_t for PowerPC as an ABI break, which predates the addition of FreeBSD support to OpenZFS. Moreover, 64-bit PowerPC has existed since FreeBSD 9.0, where __powerpc__ is also defined (alongside __powerpc64__ to disambiguate), which has always had a 64-bit time_t. This code has therefore always been wrong for all PowerPC variants. Fix this by limiting the 32-bit case to just i386, which is the only architecture in FreeBSD to have a 32-bit time_t and not have broken ABI, due to its special legacy compatibility status. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Closes #18217 Closes #18218 Reported by: fuz MFC after: 1 day
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/time.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/time.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/time.h
index 14b42f2e7087..c72c3ea3648f 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/time.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/time.h
@@ -51,7 +51,7 @@ extern int hz;
typedef longlong_t hrtime_t;
-#if defined(__i386__) || defined(__powerpc__)
+#ifdef __i386__
#define TIMESPEC_OVERFLOW(ts) \
((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX)
#else