[coreboot-gerrit] New patch to review for coreboot: util/cbfstool: don't override ntohl(3) and htonl(3) on NetBSD
Jonathan A. Kollasch (jakllsch@kollasch.net)
gerrit at coreboot.org
Mon Jul 6 15:31:08 CEST 2015
Jonathan A. Kollasch (jakllsch at kollasch.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10810
-gerrit
commit b536e2b07b5514779da8d7bcf445a1ed6aa9219f
Author: Jonathan A. Kollasch <jakllsch at kollasch.net>
Date: Mon Jul 6 08:30:13 2015 -0500
util/cbfstool: don't override ntohl(3) and htonl(3) on NetBSD
Change-Id: I9bfc017dee86fe6cbc51de99f46429d53efe7d11
Signed-off-by: Jonathan A. Kollasch <jakllsch at kollasch.net>
---
util/cbfstool/common.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 7fa7c7e..06ee00b 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -28,9 +28,11 @@
/* Endianess */
#include "swab.h"
-#ifndef __APPLE__
+#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__)
+#include <arpa/inet.h>
#endif
#define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
#define htonll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
More information about the coreboot-gerrit
mailing list