mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-24 12:07:12 -04: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
1 changed files with 6 additions and 1 deletions
|
@ -22,11 +22,16 @@
|
|||
#define bswap_32(x) _byteswap_ulong(x)
|
||||
#define bswap_64(x) _byteswap_uint64(x)
|
||||
// BSD
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16(x) bswap16(x)
|
||||
#define bswap_32(x) bswap32(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
|
||||
#else
|
||||
#include <endian.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue