backport: add new build_bug.h file
authorLuca Coelho <luciano.coelho@intel.com>
Sun, 18 Feb 2018 13:24:55 +0000 (15:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 23 Feb 2018 11:34:07 +0000 (12:34 +0100)
Some of the code in bug.h was moved into a new build_bug.h file.  Add
a backport that includes bug.h in the case of older kernels.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/backport-include/linux/build_bug.h [new file with mode: 0644]

diff --git a/backport/backport-include/linux/build_bug.h b/backport/backport-include/linux/build_bug.h
new file mode 100644 (file)
index 0000000..13ee5d6
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __BP_BUILD_BUG_H
+#define __BP_BUILD_BUG_H
+
+#if LINUX_VERSION_IS_GEQ(4,13,0)
+#include_next <linux/build_bug.h>
+#else /* LINUX_VERSION_IS_GEQ(4,13,0) */
+#include <linux/bug.h>
+#endif /* LINUX_VERSION_IS_GEQ(4,13,0) */
+
+#endif /* __BP_BUILD_BUG_H */