summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/os.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-13 14:33:02 -0500
committerTom Rini <trini@konsulko.com>2022-01-13 14:33:02 -0500
commit25711b07ca1dcf73dc41b45ca040dadbcff0fa08 (patch)
treede49c129e19ab9b129aca41d59cd8ecdc3e18de7 /arch/sandbox/cpu/os.c
parent743c562d0c5269740236864bdb0002e73ec3e614 (diff)
parent6c9e3d1fc085977b5b38dfe610f65d1a7f48081b (diff)
Merge tag 'dm-pull-13jan22' of https://source.denx.de/u-boot/custodians/u-boot-dm
bloblist prep for standard passage switch order of pinctrl and power domain calls various minor fixes
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r--arch/sandbox/cpu/os.c10
1 files changed, 8 insertions, 2 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)