hush: re-sequence includes
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 26 Oct 2019 21:45:08 +0000 (23:45 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 7 Nov 2019 23:01:13 +0000 (18:01 -0500)
'make tests' on a 32bit ARM system leads to

In file included from ../common/cli_hush.c:79:
../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 ../common/cli_hush.c:78:
../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 ../common/cli_hush.c:79:
../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 ../common/cli_hush.c:78:
../include/linux/string.h:106:15:
note: previous declaration of ‘memcpy’ was here
 extern void * memcpy(void *,const void *,__kernel_size_t);
        ^~~~~~

According to the U-Boot coding style guide common.h should be the first
include.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
common/cli_hush.c

index 8f86e4aa4a49e8e80a1f247951640fbbf2541d01..cf1e273485c7e98c82cc897030439faf3a2e917e 100644 (file)
 
 #define __U_BOOT__
 #ifdef __U_BOOT__
+#include <common.h>         /* readline */
 #include <env.h>
 #include <malloc.h>         /* malloc, free, realloc*/
 #include <linux/ctype.h>    /* isalpha, isdigit */
-#include <common.h>        /* readline */
 #include <console.h>
 #include <bootretry.h>
 #include <cli.h>