diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-23 03:28:43 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-23 03:28:43 -0400 |
commit | c88b7beaafd711e0ca98529a56c9d35eedc60b5f (patch) | |
tree | e7e8cfa88d4e89afa3fbd52b5db48d2c518a1ab6 | |
parent | 49efa0e0494d982c422842a63d2228fafe1181a3 (diff) | |
download | kvm-unit-tests-c88b7beaafd711e0ca98529a56c9d35eedc60b5f.tar.gz |
lib/alloc.c: fix missing include
Include bitops.h to get BITS_PER_LONG and avoid errors such as
lib/alloc.c: In function mult_overflow:
lib/alloc.c:24:9: error: right shift count >= width of type
[-Werror=shift-count-overflow]
24 | if ((a >> 32) && (b >> 32))
| ^~
Fixes: cde8415e1 ("lib/alloc.c: add overflow check for calloc")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | lib/alloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/alloc.c b/lib/alloc.c index f4aa87a..6c89f98 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -1,5 +1,6 @@ #include "alloc.h" #include "asm/page.h" +#include "bitops.h" void *malloc(size_t size) { |