Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144411126
D45453.id139604.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
D45453.id139604.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/math.h b/sys/compat/linuxkpi/common/include/linux/math.h
--- a/sys/compat/linuxkpi/common/include/linux/math.h
+++ b/sys/compat/linuxkpi/common/include/linux/math.h
@@ -5,6 +5,7 @@
* Copyright (c) 2014-2015 François Tigeot
* Copyright (c) 2016 Matt Macy <mmacy@FreeBSD.org>
* Copyright (c) 2019 Johannes Lundberg <johalun@FreeBSD.org>
+ * Copyright (c) 2023 Serenity Cyber Security, LLC.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -55,6 +56,14 @@
__ret; \
})
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60600
+#define abs_diff(x, y) ({ \
+ __typeof(x) _x = (x); \
+ __typeof(y) _y = (y); \
+ _x > _y ? _x - _y : _y - _x; \
+})
+#endif
+
static inline uintmax_t
mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 7:28 AM (16 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28544939
Default Alt Text
D45453.id139604.diff (921 B)
Attached To
Mode
D45453: LinuxKPI: Add abs_diff to linux/math.h
Attached
Detach File
Event Timeline
Log In to Comment