freebsd-ports/biology/abyss/files/patch-Common_city.cc
Piotr Kubaj ba101b3372 biology/abyss: fix build on big-endian architectures
Use new GCC from ports on GCC architectures.

Merge 25eb9d2a914fb211fdfe04fcda5593f29fd23ff5, fixes build on GCC architectures.

Also include sys/endian.h and use bswap32 and bswap64 for byte-swapping (PR at https://github.com/bcgsc/abyss/pull/287 ).

PR:		238737
Approved by:	yuri (maintainer), mat (mentor)
Differential Revision:	https://reviews.freebsd.org/D20717
2019-06-21 11:43:09 +00:00

13 lines
363 B
C++

--- Common/city.cc.orig 2018-09-21 23:44:14 UTC
+++ Common/city.cc
@@ -65,6 +65,10 @@ static uint32 UNALIGNED_LOAD32(const char *p) {
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
#else
#include <byteswap.h>
#endif