[PATCH 44/47] headers: Add new include/linux/bits.h

Hauke Mehrtens <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
With kernel 4.19 some defines from include/linux/bitops.h were extracted
to the new file include/linux/bits.h. This patch was also backported to
older stable kernel versions. This patch makes code include the
include/linux/bitops.h file on older kernel versions.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/linux/bits.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/linux/bits.h

diff --git a/backport/backport-include/linux/bits.h b/backport/backport-include/linux/bits.h
new file mode 100644
index 00000000..db792196
--- /dev/null
+++ b/backport/backport-include/linux/bits.h
@@ -0,0 +1,14 @@
+#ifndef __BACKPORT_LINUX_BITS_H
+#define __BACKPORT_LINUX_BITS_H
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_GEQ(4,19,0) || \
+    LINUX_VERSION_IN_RANGE(4,14,119, 4,15,0) || \
+    LINUX_VERSION_IN_RANGE(4,9,176, 4,10,0) || \
+    LINUX_VERSION_IN_RANGE(4,4,180, 4,5,0)
+#include_next <linux/bits.h>
+#else
+#include <linux/bitops.h>
+#endif /* >= 4.19 */
+
+#endif /* __BACKPORT_LINUX_BITS_H */
-- 
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.