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>
This commit is contained in:
parent
aad9b6a086
commit
fb456e61a9
|
@ -18,7 +18,7 @@
|
||||||
#if !defined(__APPLE__) && !defined(__NetBSD__)
|
#if !defined(__APPLE__) && !defined(__NetBSD__)
|
||||||
#define ntohl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x))
|
#define ntohl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x))
|
||||||
#define htonl(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>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
#define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
#define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
||||||
|
|
Loading…
Reference in New Issue