diff options
author | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2015-07-06 08:30:13 -0500 |
---|---|---|
committer | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2015-07-06 20:53:37 +0200 |
commit | 1142197e27a9887b9a7aa284d244dfd2c4fc38cb (patch) | |
tree | a5557a8919f9bbed8a6e72d3441b1d04676e370d | |
parent | fb6f78e61ebdb264c8d17dc94bf9db97276339ff (diff) |
util/cbfstool: don't override ntohl(3) and htonl(3) on NetBSD
Change-Id: I9bfc017dee86fe6cbc51de99f46429d53efe7d11
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-on: http://review.coreboot.org/10810
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r-- | util/cbfstool/common.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <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)) |