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>
This commit is contained in:
Jonathan A. Kollasch 2015-07-06 08:30:13 -05:00
parent fb6f78e61e
commit 1142197e27
1 changed files with 3 additions and 1 deletions

View File

@ -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))