From 449a2a0a9504bf0466a4d176f94e9d05809001be Mon Sep 17 00:00:00 2001 From: "Hunter N. Morgan" Date: Sun, 22 May 2016 21:19:53 -0500 Subject: [PATCH] Fix SWAP64 implementation to work on more platforms --- src/CryptState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CryptState.cpp b/src/CryptState.cpp index 0760374..9c5937a 100644 --- a/src/CryptState.cpp +++ b/src/CryptState.cpp @@ -181,7 +181,7 @@ bool mumlib::CryptState::decrypt(const unsigned char *source, unsigned char *dst #define SHIFTBITS 63 typedef uint64_t subblock; -#define SWAP64(x) ({register uint64_t __out, __in = (x); __asm__("bswap %q0" : "=r"(__out) : "0"(__in)); __out;}) +#define SWAP64(x) (__builtin_bswap64(x)) #define SWAPPED(x) SWAP64(x) typedef subblock keyblock[BLOCKSIZE];