lib: define ULONG_WIDTH if non-existent

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Iker Pedrosa 2023-02-21 17:35:48 +01:00 committed by Serge Hallyn
parent d80df2c8a0
commit 21d88b4525
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,11 @@
#include <limits.h>
#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);