Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59891 )
Change subject: util/cbfstool: Ensure that htole32 et al are visible when building ......................................................................
util/cbfstool: Ensure that htole32 et al are visible when building
endian.h wasn't included (although it probably came in as an indirect include) but in some header sets _XOPEN_SOURCE overrides _DEFAULT_SOURCE whereas the latter is a super set of the former:
We should get the same things as with _XOPEN_SOURCE (such as memccpy for which it has been defined) but also extra features like htole32.
Change-Id: Iaee7495b2ae64fdc719ae0879ea95fe7df286212 Signed-off-by: Patrick Georgi patrick@coreboot.org --- M util/cbfstool/flashmap/fmap.c 1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/59891/1
diff --git a/util/cbfstool/flashmap/fmap.c b/util/cbfstool/flashmap/fmap.c index c152b0d..cb67b46 100644 --- a/util/cbfstool/flashmap/fmap.c +++ b/util/cbfstool/flashmap/fmap.c @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0-only */
-#define _XOPEN_SOURCE 700 - #include <ctype.h> +#include <endian.h> #include <stdlib.h> #include <stdio.h> #include <string.h>