From 880dbc5f808b65f62b47c78939e12d32c1701ed6 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 11 Jan 2022 01:50:24 +0100 Subject: sandbox: compatibility of os_get_filesize() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U-Boot define loff_t as long long. But the header /usr/include/linux/types.h may not define it. This has lead to a build error on Alpine Linux. So let's use long long instead of loff_t for the size parameter of function os_get_filesize(). Reported-by: Milan P. Stanić Signed-off-by: Heinrich Schuchardt Tested-by: Milan P. Stanić Reviewed-by: Simon Glass --- include/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/os.h') diff --git a/include/os.h b/include/os.h index 4cbcbd93a71..10e198cf503 100644 --- a/include/os.h +++ b/include/os.h @@ -266,7 +266,7 @@ const char *os_dirent_get_typename(enum os_dirent_t type); * @size: size of file is returned if no error * Return: 0 on success or -1 if an error ocurred */ -int os_get_filesize(const char *fname, loff_t *size); +int os_get_filesize(const char *fname, long long *size); /** * os_putc() - write a character to the controlling OS terminal -- cgit v1.2.3