diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/cpu/os.c | 10 | ||||
-rw-r--r-- | arch/x86/cpu/broadwell/cpu_from_spl.c | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 6837bfceaf6..40ebe322ae0 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -624,7 +624,13 @@ const char *os_dirent_get_typename(enum os_dirent_t type) return os_dirent_typename[OS_FILET_UNKNOWN]; } -int os_get_filesize(const char *fname, loff_t *size) +/* + * For compatibility reasons avoid loff_t here. + * U-Boot defines loff_t as long long. + * But /usr/include/linux/types.h may not define it at all. + * Alpine Linux being one example. + */ +int os_get_filesize(const char *fname, long long *size) { struct stat buf; int ret; @@ -667,7 +673,7 @@ int os_read_ram_buf(const char *fname) { struct sandbox_state *state = state_get_current(); int fd, ret; - loff_t size; + long long size; ret = os_get_filesize(fname, &size); if (ret < 0) diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c index e5f62e7187c..df5a9675ee4 100644 --- a/arch/x86/cpu/broadwell/cpu_from_spl.c +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c @@ -23,7 +23,7 @@ int dram_init(void) { struct spl_handoff *ho; - ho = bloblist_find(BLOBLISTT_SPL_HANDOFF, sizeof(*ho)); + ho = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, sizeof(*ho)); if (!ho) return log_msg_ret("Missing SPL hand-off info", -ENOENT); handoff_load_dram_size(ho); @@ -56,7 +56,7 @@ int dram_init_banksize(void) { struct spl_handoff *ho; - ho = bloblist_find(BLOBLISTT_SPL_HANDOFF, sizeof(*ho)); + ho = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, sizeof(*ho)); if (!ho) return log_msg_ret("Missing SPL hand-off info", -ENOENT); handoff_load_dram_banks(ho); |