From 3ff6fe5fab11a99d4b3ec94a8a4a238d6f96f5ba Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:05 -0700 Subject: sandbox: Add a new header for the system malloc() Some files use U-Boot headers but still need to access the system malloc(). Allow this by creating a new asm/malloc.h which can be used so long as U-Boot's malloc.h has not been included. Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/sandbox/cpu/start.c') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 01adaebc61..4760731d72 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -8,10 +8,10 @@ #include #include #include -#include #include #include #include +#include #include #include #include @@ -181,7 +181,7 @@ static int sandbox_cmdline_cb_default_fdt(struct sandbox_state *state, int len; len = strlen(state->argv[0]) + strlen(fmt) + 1; - fname = os_malloc(len); + fname = malloc(len); if (!fname) return -ENOMEM; snprintf(fname, len, fmt, state->argv[0]); @@ -201,7 +201,7 @@ static int sandbox_cmdline_cb_test_fdt(struct sandbox_state *state, int len; len = strlen(state->argv[0]) + strlen(fmt) + 1; - fname = os_malloc(len); + fname = malloc(len); if (!fname) return -ENOMEM; strcpy(fname, state->argv[0]); -- cgit v1.2.3