mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-23 16:38:23 +08:00
Fix OpenBSD build, use swap16(3) from <endian.h>
bswap*() do not exist on OpenBSD.
This commit is contained in:
parent
47c8938c7e
commit
6e7b46d791
@ -22,11 +22,16 @@
|
|||||||
#define bswap_32(x) _byteswap_ulong(x)
|
#define bswap_32(x) _byteswap_ulong(x)
|
||||||
#define bswap_64(x) _byteswap_uint64(x)
|
#define bswap_64(x) _byteswap_uint64(x)
|
||||||
// BSD
|
// BSD
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#define bswap_16(x) bswap16(x)
|
#define bswap_16(x) bswap16(x)
|
||||||
#define bswap_32(x) bswap32(x)
|
#define bswap_32(x) bswap32(x)
|
||||||
#define bswap_64(x) bswap64(x)
|
#define bswap_64(x) bswap64(x)
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
#include <endian.h>
|
||||||
|
#define bswap_16(x) swap16(x)
|
||||||
|
#define bswap_32(x) swap32(x)
|
||||||
|
#define bswap_64(x) swap64(x)
|
||||||
// Everything else
|
// Everything else
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user