summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2016-04-01 22:35:27 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2016-04-30 18:00:26 +0200
commit6d0a7c91302c41fcb704a797b78fa25a87ab380b (patch)
tree3e8b08803a64f412d6f1af796eb26272ba10748e
parent88e8e0b759e19584016a8e8082e640c0f2027fbc (diff)
backport-include: fix abs definition in kernel.h
The definition of abs should be within include protection to avoid following build issue: In file included from /tmp/bp-test/backport-include/linux/kernel.h:3:0, from include/linux/cache.h:4, from include/linux/time.h:4, from /tmp/bp-test/backport-include/linux/time.h:3, from include/linux/stat.h:18, from include/linux/module.h:10, from /tmp/bp-test/backport-include/linux/module.h:3, from /tmp/bp-test/net/wireless/nl80211.c:10: include/linux/kernel.h:179:0: warning: "abs" redefined [enabled by default] error, forbidden warning: kernel.h:179 make[6]: *** [/tmp/bp-test/net/wireless/nl80211.o] Error 1 Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/kernel.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h
index 7d56f02b..54050aa5 100644
--- a/backport/backport-include/linux/kernel.h
+++ b/backport/backport-include/linux/kernel.h
@@ -153,19 +153,6 @@ int __must_check hex2bin(u8 *dst, const char *src, size_t count);
#define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
#endif /* < 3.18 */
-#endif /* __BACKPORT_KERNEL_H */
-
-/*
- * We have to do this outside the include guard, because
- * out own header (linux/export.h) has to include kernel.h
- * indirectly (through module.h) and then undef's pr_fmt.
- * Then, when the real kernel.h gets included again, it's
- * not defined and we get problems ...
- */
-#ifndef pr_fmt
-#define pr_fmt(msg) msg
-#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
#undef abs
@@ -193,3 +180,16 @@ int __must_check hex2bin(u8 *dst, const char *src, size_t count);
({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
#endif
+
+#endif /* __BACKPORT_KERNEL_H */
+
+/*
+ * We have to do this outside the include guard, because
+ * out own header (linux/export.h) has to include kernel.h
+ * indirectly (through module.h) and then undef's pr_fmt.
+ * Then, when the real kernel.h gets included again, it's
+ * not defined and we get problems ...
+ */
+#ifndef pr_fmt
+#define pr_fmt(msg) msg
+#endif