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:
parent
fb6f78e61e
commit
1142197e27
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue