lib/{bitops,alloc_page}.h: Add missing headers
bitops.h uses the 'bool' and 'size_t' types, but doesn't include the stddef.h and stdbool.h headers, where the types are defined. This can cause the following error when compiling: In file included from arm/new-test.c:9: /path/to/kvm-unit-tests/lib/bitops.h:77:15: error: unknown type name 'bool' 77 | static inline bool is_power_of_2(unsigned long n) | ^~~~ /path/to/kvm-unit-tests/lib/bitops.h:82:38: error: unknown type name 'size_t' 82 | static inline unsigned int get_order(size_t size) | ^~~~~~ /path/to/kvm-unit-tests/lib/bitops.h:24:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'? 23 | #include <asm/bitops.h> +++ |+#include <stddef.h> 24 | make: *** [<builtin>: arm/new-test.o] Error 1 The same errors were observed when including alloc_page.h. Fix both files by including stddef.h and stdbool.h.
Loading
Please register or sign in to comment