Commit e731af4893f7741c66254161ad9b6f5280369895
1 parent
051aa89f46
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
efi_loader: correct includes in efi_variable.c
'make tests' on an 32bit ARM system leads to In file included from ../lib/efi_loader/efi_variable.c:9: ../include/malloc.h:364:7: error: conflicting types for ‘memset’ void* memset(void*, int, size_t); ^~~~~~ In file included from ../include/compiler.h:126, from ../include/env.h:12, from ../lib/efi_loader/efi_variable.c:8: ../include/linux/string.h:103:15: note: previous declaration of ‘memset’ was here extern void * memset(void *,int,__kernel_size_t); ^~~~~~ In file included from ../lib/efi_loader/efi_variable.c:9: ../include/malloc.h:365:7: error: conflicting types for ‘memcpy’ void* memcpy(void*, const void*, size_t); ^~~~~~ In file included from ../include/compiler.h:126, from ../include/env.h:12, from ../lib/efi_loader/efi_variable.c:8: ../include/linux/string.h:106:15: note: previous declaration of ‘memcpy’ was here extern void * memcpy(void *,const void *,__kernel_size_t); ^~~~~~ Use common.h as first include as recommended by the U-Boot coding style guide. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Showing 1 changed file with 3 additions and 5 deletions Side-by-side Diff
lib/efi_loader/efi_variable.c
... | ... | @@ -5,14 +5,12 @@ |
5 | 5 | * Copyright (c) 2017 Rob Clark |
6 | 6 | */ |
7 | 7 | |
8 | -#include <env.h> | |
9 | -#include <malloc.h> | |
10 | -#include <charset.h> | |
8 | +#include <common.h> | |
11 | 9 | #include <efi_loader.h> |
12 | -#include <hexdump.h> | |
13 | 10 | #include <env_internal.h> |
11 | +#include <hexdump.h> | |
12 | +#include <malloc.h> | |
14 | 13 | #include <search.h> |
15 | -#include <uuid.h> | |
16 | 14 | |
17 | 15 | #define READ_ONLY BIT(31) |
18 | 16 |