summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2015-04-28 13:09:36 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-04-28 22:13:24 +0200
commitcccc9d40876aa5a2f756777a57646a4b95b38fde (patch)
tree8d247f0135bd4259cf56929d70fb2de46b570060 /util
parent595e7777e7282249b13c3d7f8a45178e76798690 (diff)
downloadcoreboot-cccc9d40876aa5a2f756777a57646a4b95b38fde.tar.xz
cbfstool: compare pointer difference with ptrdiff_t value
Fixes building cbfstool in 32bit environments. Change-Id: I3c94afc9c961eb8b41d1e08f4a16e5cab2a6bb8b Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/10015 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/cbfs_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index e61664ce08..2581bef3f4 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -19,6 +19,7 @@
#include <inttypes.h>
#include <libgen.h>
+#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -449,7 +450,7 @@ static int cbfs_add_entry_at(struct cbfs_image *image,
content_offset, (int)((char*)CBFS_SUBHEADER(entry) -
image->buffer.data));
assert((char*)CBFS_SUBHEADER(entry) - image->buffer.data ==
- content_offset);
+ (ptrdiff_t)content_offset);
memcpy(CBFS_SUBHEADER(entry), data, size);
if (verbose > 1) cbfs_print_entry_info(image, entry, stderr);