aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2025-09-04 20:23:00 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2025-09-05 23:24:14 +0000
commit736b16e88d2384f9dd0ec11c0492e825b8d42193 (patch)
tree0160dfb973df7e6aa53d4591629a0cfab3a6c9f9
parent627234627b51c2f12c29d10617d7bbd18936ea55 (diff)
LinuxKPI: correct the LINUXKPI_VERSION check for abs_diff()
The code introduced abs_diff() as migrated from drm to standard linux headers. The LINUXKPI_VERSION check did not allow this to be visible by default in-tree. Make sure the v6.6 check is optional. drm-kmod always defines LINUXKPI_VERSION so this should be fine. Sponsored by: The FreeBSD Foundation (initially) Fixes: afc450fac9f04 MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52071
-rw-r--r--sys/compat/linuxkpi/common/include/linux/math.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/math.h b/sys/compat/linuxkpi/common/include/linux/math.h
index 5a348a57747b..1d50e011f66d 100644
--- a/sys/compat/linuxkpi/common/include/linux/math.h
+++ b/sys/compat/linuxkpi/common/include/linux/math.h
@@ -56,7 +56,7 @@
__ret; \
})
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60600
+#if !defined(LINUXKPI_VERSION) || (LINUXKPI_VERSION >= 60600)
#define abs_diff(x, y) ({ \
__typeof(x) _x = (x); \
__typeof(y) _y = (y); \