From 1142197e27a9887b9a7aa284d244dfd2c4fc38cb Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Mon, 6 Jul 2015 08:30:13 -0500 Subject: util/cbfstool: don't override ntohl(3) and htonl(3) on NetBSD Change-Id: I9bfc017dee86fe6cbc51de99f46429d53efe7d11 Signed-off-by: Jonathan A. Kollasch Reviewed-on: http://review.coreboot.org/10810 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- util/cbfstool/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util/cbfstool') diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index 7fa7c7e39b..06ee00b39b 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 #endif #define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x)) #define htonll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x)) -- cgit v1.2.3