From 21d88b4525aa7f924d140b5d4bf88022587dd224 Mon Sep 17 00:00:00 2001 From: Iker Pedrosa Date: Tue, 21 Feb 2023 17:35:48 +0100 Subject: [PATCH] lib: define ULONG_WIDTH if non-existent Signed-off-by: Alejandro Colomar Signed-off-by: Iker Pedrosa --- lib/bit.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/bit.h b/lib/bit.h index 076e01a0..d5b94dae 100644 --- a/lib/bit.h +++ b/lib/bit.h @@ -14,6 +14,11 @@ #include +#ifndef ULONG_WIDTH +#define ULONG_WIDTH (sizeof(unsigned long) * CHAR_BIT) +#endif + + inline unsigned long bit_ceilul(unsigned long x); inline unsigned long bit_ceil_wrapul(unsigned long x); inline int leading_zerosul(unsigned long x);