diff options
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index a1c1abb514..ed1961e887 100644 --- a/include/util.h +++ b/include/util.h @@ -15,6 +15,9 @@ #include "builtin/assert.h" /* For ASSERT(). */ #include <stdbool.h> #include <stddef.h> +#ifdef CONFIG_ZEPHYR +#include <sys/util.h> +#endif #ifdef __cplusplus extern "C" { @@ -73,7 +76,9 @@ extern "C" { #define POWER_OF_TWO(x) ((x) && !((x) & ((x) - 1))) /* Macro to check if the value is in range */ +#ifndef CONFIG_ZEPHYR #define IN_RANGE(x, min, max) ((x) >= (min) && (x) < (max)) +#endif /* * macros for integer division with various rounding variants |