While sizeof(unsigned long) == sizeof(size_t) in barebox, size_t an be
typedeffed as unsigned int on 32-bit, which leads to a mismatch with the
struct efi_load_file_protocol definition we already had.

Switch over to size_t as in the header to fix this.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 efi/initrd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/efi/initrd.c b/efi/initrd.c
index 7fd8e021f353..642422b38d2a 100644
--- a/efi/initrd.c
+++ b/efi/initrd.c
@@ -17,7 +17,7 @@
 
 static efi_status_t EFIAPI efi_initrd_load_file2(
        struct efi_load_file_protocol *this, struct efi_device_path *file_path,
-       bool boot_policy, unsigned long *buffer_size, void *buffer);
+       bool boot_policy, size_t *buffer_size, void *buffer);
 
 static const struct {
        struct efi_device_path_vendor vendor;
@@ -44,7 +44,7 @@ static struct linux_initrd {
 
 static efi_status_t EFIAPI efi_initrd_load_file2(
        struct efi_load_file_protocol *this, struct efi_device_path *file_path,
-       bool boot_policy, unsigned long *buffer_size, void *buffer)
+       bool boot_policy, size_t *buffer_size, void *buffer)
 {
 
        struct linux_initrd *initrd = to_linux_initrd(this);
-- 
2.47.3


Reply via email to