[coreboot-gerrit] Patch set updated for coreboot: cbfstool: Add header file for ntohl & htonl on Apple

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Thu Nov 19 03:49:27 CET 2015


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11672

-gerrit

commit a0220831cdcdf70a7e6ad48be508f7beefdbf3a9
Author: zbao <fishbaozi at gmail.com>
Date:   Wed Sep 16 13:27:22 2015 -0700

    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 at amd.com>
    Signed-off-by: Zheng Bao <fishbaozi at gmail.com>
---
 util/cbfstool/swab.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cbfstool/swab.h b/util/cbfstool/swab.h
index 22ae8b4..a45a767 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))



More information about the coreboot-gerrit mailing list