diff options
author | Alexandru Elisei <alexandru.elisei@arm.com> | 2022-04-12 14:32:22 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-05-06 14:21:16 +0100 |
commit | d9b64eb6aa05e552d6c9abf26ae9d87d9fb9c4ed (patch) | |
tree | b1d1943bab783fe26f2a0d21ec8923255b821ea7 | |
parent | 443cd881b47126bde6f442abc1f6c76998d713b7 (diff) | |
download | kvmtool-d9b64eb6aa05e552d6c9abf26ae9d87d9fb9c4ed.tar.gz |
linux/bitops.h: Include wordsize.h to provide the __WORDSIZE define
Trying to build a source file which included bitops.h, but didn't also
bring in the definition for __WORDSIZE (by including limits.h, for example)
would result in the following error:
include/linux/bitops.h:8:23: error: ‘__WORDSIZE’ undeclared (first use in this function)
8 | #define BITS_PER_LONG __WORDSIZE
| ^~~~~~~~~~
The symbol is defined in the bits/wordsize.h header file, include it.
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20220412133231.35355-3-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | include/linux/bitops.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 56448b71..3d31f0ac 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -1,6 +1,8 @@ #ifndef _KVM_LINUX_BITOPS_H_ #define _KVM_LINUX_BITOPS_H_ +#include <bits/wordsize.h> + #include <linux/kernel.h> #include <linux/compiler.h> #include <asm/hweight.h> |