Skip to content

Commit

Permalink
AP_HAL: support port SITL to OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
rsaxvc authored and peterbarker committed Nov 6, 2024
1 parent 9696081 commit c0ee3b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/AP_HAL/utility/sparse-endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0ee3b2

Please sign in to comment.