From fb456e61a9d8b86f852d84e40ffb340d3ce5d3d7 Mon Sep 17 00:00:00 2001 From: zbao Date: Wed, 16 Sep 2015 13:27:22 -0700 Subject: cbfstool: Add header file for ntohl & htonl on Apple On Apple OS X, the ntohl and htonl need including header, #include Please refer the manpage for these command on OS X, https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/htonl.3.html Change-Id: Ia942c58f34637c18222fbf985b93c48abf63c5b8 Signed-off-by: Zheng Bao Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/11672 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- util/cbfstool/swab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/cbfstool/swab.h') diff --git a/util/cbfstool/swab.h b/util/cbfstool/swab.h index 22ae8b41b8..a45a7673d9 100644 --- a/util/cbfstool/swab.h +++ b/util/cbfstool/swab.h @@ -18,7 +18,7 @@ #if !defined(__APPLE__) && !defined(__NetBSD__) #define ntohl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x)) #define htonl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x)) -#elif defined(__NetBSD__) +#else #include #endif #define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x)) -- cgit v1.2.3