diff mbox series

[04/47] backports: Add linux/math.h

Message ID 20211019214320.2035704-5-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:42 p.m. UTC
This header file was added to the kernel, by extracting some functions
from linux/kernel.h. Add an empty version which itself includes
linux/kernel.h This way it will provide the same data also on older
kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/math.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 backport/backport-include/linux/math.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/math.h b/backport/backport-include/linux/math.h
new file mode 100644
index 00000000..10225a9d
--- /dev/null
+++ b/backport/backport-include/linux/math.h
@@ -0,0 +1,12 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __BACKPORTS_LINUX_MATH_H
+#define __BACKPORTS_LINUX_MATH_H
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_GEQ(5,11,0)
+#include_next <linux/math.h>
+#else
+#include <linux/kernel.h>
+#endif
+
+#endif /* __BACKPORTS_LINUX_MATH_H */