AP_HAL: support port SITL to OpenBSD

This commit is contained in:
Richard Allen 2024-11-05 18:44:49 -06:00 committed by Peter Barker
parent 9696081a85
commit c0ee3b2216
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ typedef uint64_t __ap_bitwise be64_t;
#undef be64toh
#undef le64toh
#if !defined (__BYTE_ORDER) && defined (__OpenBSD__)
#define __BYTE_ORDER __BYTE_ORDER__
#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define bswap_16_on_le(x) __bswap_16(x)
#define bswap_32_on_le(x) __bswap_32(x)