Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 40b95b07524a06ae4f9041958bd5971e40701b1b Author: Sven Eckelmann sven@narfation.org Date: Sun Nov 19 17:12:03 2017 +0100
batman-adv: include build_bug.h for BUILD_BUG_ON define
commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into <linux/build_bug.h>") added a new header for BUILD_BUG_ON. It should therefore be included instead of linux/bug.h
Signed-off-by: Sven Eckelmann sven@narfation.org
40b95b07524a06ae4f9041958bd5971e40701b1b compat-include/linux/{export.h => build_bug.h} | 12 +++++++----- net/batman-adv/main.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/compat-include/linux/export.h b/compat-include/linux/build_bug.h similarity index 77% copy from compat-include/linux/export.h copy to compat-include/linux/build_bug.h index 39679142..d1ebfa71 100644 --- a/compat-include/linux/export.h +++ b/compat-include/linux/build_bug.h @@ -21,12 +21,14 @@ * of the Linux kernel. */
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_EXPORT_H_ -#define _NET_BATMAN_ADV_COMPAT_LINUX_EXPORT_H_ +#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ +#define _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_
#include <linux/version.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) -#include_next <linux/export.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) +#include_next <linux/build_bug.h> +#else +#include <linux/bug.h> #endif
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_EXPORT_H_ */ +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ */ diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 45f0f4ff..107b50e5 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -21,7 +21,7 @@ #include "main.h"
#include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/crc32c.h> #include <linux/errno.h> diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index c7874e7b..d293bb36 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -22,7 +22,7 @@ #include "main.h"
#include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h> diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 66092c6b..db7a67ee 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -23,7 +23,7 @@
#include <linux/atomic.h> #include <linux/bitops.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h>