From: Arnaldo Carvalho de Melo Date: Wed, 22 Feb 2017 20:42:40 +0000 (-0300) Subject: tools include: Add UINT_MAX def to kernel.h X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eaa75b5117d52adf1efd3c6c3fb4bd8f97de648b;p=openwrt%2Fstaging%2Fblogic.git tools include: Add UINT_MAX def to kernel.h 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 Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-gmwyal7c9vzzttlyk6u59rzn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 #include +#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)