File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#define __BYTE_ORDER BYTE_ORDER
1313#define __BIG_ENDIAN BIG_ENDIAN
1414#define __LITTLE_ENDIAN LITTLE_ENDIAN
15+ // UEFITool: add MinGW
1516#elif defined(_MSC_VER) || defined(__MINGW32__)
1617#include < stdlib.h>
1718#define __LITTLE_ENDIAN 1234
3233#else
3334// At this point it's either Linux or BSD. Both have "sys/param.h", so it's safe to include
3435#include < sys/param.h> // `BSD` macro // IWYU pragma: keep
35- #if defined(BSD)
36+ // UEFITool: add special case of OpenBSD
37+ #if defined(__OpenBSD__)
38+ #include < endian.h>
39+ #define bswap_16 (x ) swap16(x)
40+ #define bswap_32 (x ) swap32(x)
41+ #define bswap_64 (x ) swap64(x)
42+ #elif defined(BSD)
3643// Supposed to work on FreeBSD: https://man.freebsd.org/cgi/man.cgi?query=bswap16&manpath=FreeBSD+14.0-RELEASE
3744// Supposed to work on NetBSD: https://man.netbsd.org/NetBSD-10.0/bswap16.3
3845#include < sys/endian.h>
You can’t perform that action at this time.
0 commit comments