[PATCH 08/35] tools include: Add UINT_MAX def to kernel.h
From: Arnaldo Carvalho de Melo
Date: Mon Mar 06 2017 - 14:38:55 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
The kernel has it and some files we got from there would require us
including the userland header for that, so add it conditionally.
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Elena Reshetova <elena.reshetova@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-gmwyal7c9vzzttlyk6u59rzn@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/include/linux/kernel.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 28607db02bd3..adb4d0147755 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -5,6 +5,10 @@
#include <stddef.h>
#include <assert.h>
+#ifndef UINT_MAX
+#define UINT_MAX (~0U)
+#endif
+
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define PERF_ALIGN(x, a) __PERF_ALIGN_MASK(x, (typeof(x))(a)-1)
--
2.9.3