From 4b93a4f47a7457162d1be20eeffe57f81d5cd6af Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 21 Sep 2015 13:10:13 -0500 Subject: cbfstool: don't use endian to fix BSD hosts endian.h lives in under sys on the BSDs. Replace htole32() with swab32(htonl(..)) as a proxy for little endian operations. Change-Id: I84a88f6882b6c8f14fb089e4b629e916386afe4d Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11695 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering Reviewed-by: Jonathan A. Kollasch --- util/cbfstool/cbfstool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index ed6e898f5d..5194061f3c 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -19,7 +19,6 @@ * Foundation, Inc. */ -#include #include #include #include @@ -272,7 +271,7 @@ static int cbfs_add_master_header(void) // TODO: when we have a BE target, we'll need to store this as BE *(uint32_t *)(buffer_get(&image.buffer) + buffer_size(&image.buffer) - 4) = - htole32(header_offset); + swab32(htonl(header_offset)); ret = 0; -- cgit v1.2.3