diff options
author | zbao <fishbaozi@gmail.com> | 2015-09-16 13:27:22 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-01-20 16:10:20 +0100 |
commit | fb456e61a9d8b86f852d84e40ffb340d3ce5d3d7 (patch) | |
tree | 04449cfcfdeb40b22c8f1268c611c06dfa54c9f1 /util/cbfstool | |
parent | aad9b6a086ed6da1a07898624537ddef615c7fdd (diff) | |
download | coreboot-fb456e61a9d8b86f852d84e40ffb340d3ce5d3d7.tar.xz |
cbfstool: Add header file for ntohl & htonl on Apple
On Apple OS X, the ntohl and htonl need including header,
#include <arpa/inet.h>
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 <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/11672
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/swab.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 <arpa/inet.h> #endif #define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x)) |