Skip to content

Commit

Permalink
Add GCC macros for byte order
Browse files Browse the repository at this point in the history
  • Loading branch information
mannyamorim committed Nov 9, 2020
1 parent 494c386 commit 00e0841
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "motiondetect.h"

#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \
defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ || \
defined(__BIG_ENDIAN__) || \
defined(__ARMEB__) || \
defined(__THUMBEB__) || \
Expand All @@ -56,6 +57,7 @@ static double byteSwapDouble(double v)
return result;
}
#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \
defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || \
defined(__LITTLE_ENDIAN__) || \
defined(__ARMEL__) || \
defined(__THUMBEL__) || \
Expand Down

0 comments on commit 00e0841

Please sign in to comment.