[PATCH v2 kvmtool 02/10] bitops.h: Include wordsize.h to provide the __WORDSIZE define

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 include/linux/bitops.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 56448b71ebbf..3d31f0acf48e 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>
-- 
2.31.1

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux