efi_loader: correct includes in efi_variable.c
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 26 Oct 2019 21:53:48 +0000 (23:53 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 30 Oct 2019 16:49:41 +0000 (17:49 +0100)
'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>
lib/efi_loader/efi_variable.c

index d0daf7bdebbf25536350a6bbf46aa160a5800567..46f35bc60ba0d4cfdbeed1cf3c02758864ee4bce 100644 (file)
@@ -5,14 +5,12 @@
  *  Copyright (c) 2017 Rob Clark
  */
 
  *  Copyright (c) 2017 Rob Clark
  */
 
-#include <env.h>
-#include <malloc.h>
-#include <charset.h>
+#include <common.h>
 #include <efi_loader.h>
 #include <efi_loader.h>
-#include <hexdump.h>
 #include <env_internal.h>
 #include <env_internal.h>
+#include <hexdump.h>
+#include <malloc.h>
 #include <search.h>
 #include <search.h>
-#include <uuid.h>
 
 #define READ_ONLY BIT(31)
 
 
 #define READ_ONLY BIT(31)