diff options
Diffstat (limited to 'common/fb_mmc.c')
-rw-r--r-- | common/fb_mmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/fb_mmc.c b/common/fb_mmc.c index e4fbd8dfa7..b480e76554 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -13,6 +13,7 @@ #include <part.h> #include <sparse_format.h> #include <mmc.h> +#include <div64.h> #ifndef CONFIG_FASTBOOT_GPT_NAME #define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME @@ -73,7 +74,7 @@ static void write_raw_image(block_dev_desc_t *dev_desc, disk_partition_t *info, /* determine number of blocks to write */ blkcnt = ((download_bytes + (info->blksz - 1)) & ~(info->blksz - 1)); - blkcnt = blkcnt / info->blksz; + blkcnt = lldiv(blkcnt, info->blksz); if (blkcnt > info->size) { error("too large for partition: '%s'\n", part_name); |