]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib: define ULONG_WIDTH if non-existent
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 21 Feb 2023 16:35:48 +0000 (17:35 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 24 Feb 2023 18:44:14 +0000 (12:44 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
lib/bit.h

index 076e01a092b1380cff87c58268416de668516214..d5b94dae6a58ea24d6b93cf13b6b1ddb4da47866 100644 (file)
--- a/lib/bit.h
+++ b/lib/bit.h
 #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);