[coreboot] New patch to review for coreboot: a1ebc64 cbfstool: Fix warnings on OS X

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Fri Jan 4 22:54:02 CET 2013

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2106


commit a1ebc64f885b4ab0648e8743e994e8b835169ee5
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Fri Jan 4 13:51:36 2013 -0800

    cbfstool: Fix warnings on OS X
    Most hton and noth functions are already available
    through the system headers we include on OS X, causing
    the compiler to warn about duplicate definitions.
    Change-Id: Id81852dfc028cf0c48155048c54d431436889c0e
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
 util/cbfstool/common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index b5258a3..853e529 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -22,8 +22,10 @@
 #include <stdint.h>
 #include "swab.h"
+#ifndef __APPLE__
 #define ntohl(x)  (host_bigendian?(x):swab32(x))
 #define htonl(x)  (host_bigendian?(x):swab32(x))
 #define ntohll(x) (host_bigendian?(x):swab64(x))
 #define htonll(x) (host_bigendian?(x):swab64(x))

More information about the coreboot mailing list