From 383eb139ff70e561e9fe776d997afc6b7c045300 Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Sun, 9 Aug 2015 17:08:38 +0200 Subject: [PATCH] ck_limits.h: assure UINT*_MAX ff are available in-kernel this should work back to at least 3.5 kernels --- include/ck_limits.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/ck_limits.h b/include/ck_limits.h index 29b8f13..382b296 100644 --- a/include/ck_limits.h +++ b/include/ck_limits.h @@ -26,6 +26,20 @@ #if defined(__linux__) && defined(__KERNEL__) #include + +#ifndef UINT8_MAX +#define UINT8_MAX ((u8)(~0U)) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX USHRT_MAX +#endif +#ifndef UINT32_MAX +#define UINT32_MAX UINT_MAX +#endif +#ifndef UINT64_MAX +#define UINT64_MAX ULLONG_MAX +#endif + #else #include #endif /* __linux__ && __KERNEL__ */