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:
@@ -28,9 +28,11 @@
|
|||||||
|
|
||||||
/* Endianess */
|
/* Endianess */
|
||||||
#include "swab.h"
|
#include "swab.h"
|
||||||
#ifndef __APPLE__
|
#if !defined(__APPLE__) && !defined(__NetBSD__)
|
||||||
#define ntohl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x))
|
#define ntohl(x) (is_big_endian() ? (uint32_t)(x) : swab32(x))
|
||||||
#define htonl(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
|
#endif
|
||||||
#define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
#define ntohll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
||||||
#define htonll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
#define htonll(x) (is_big_endian() ? (uint64_t)(x) : swab64(x))
|
||||||
|
Reference in New Issue
Block a user