Hung-Te Lin (hungte(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2202
-gerrit
commit 5027c33a6c9728616d00813ad4130d6eaefb46d0
Author: Hung-Te Lin <hungte(a)chromium.org>
Date: Mon Jan 28 23:33:36 2013 +0800
cbfstool: Use system provided ntohl/htonl.
ntohl/htonl is part of POSIX API so we don't need to use our own implementation
(endian detection + swab*).
Change-Id: I529fbf7a85bcf023cbcd0d4188594ac1a9137d87
Signed-off-by: Hung-Te Lin <hungte(a)chromium.org>
---
util/cbfstool/common.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index f594727..2b6d4a0 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -24,10 +24,7 @@
/* Endianess */
#include "swab.h"
-#ifndef __APPLE__
-#define ntohl(x) (is_big_endian ? (x) : swab32(x))
-#define htonl(x) (is_big_endian ? (x) : swab32(x))
-#endif
+#include <arpa/inet.h> /* for ntohl, htonl */
#define ntohll(x) (is_big_endian() ? (x) : swab64(x))
#define htonll(x) (is_big_endian() ? (x) : swab64(x))
extern int is_big_endian(void);