From 8d2f179f3e9bd56088c7d961919d06abaa6505ba Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Tue, 14 Mar 2017 19:03:39 +0000 Subject: [PATCH] clang fix --- cli-miner.cpp | 3 +++ crypto/soft_aes.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/cli-miner.cpp b/cli-miner.cpp index 0382785..5e19755 100644 --- a/cli-miner.cpp +++ b/cli-miner.cpp @@ -33,6 +33,7 @@ #include #include +#include //Do a press any key for the windows folk. *insert any key joke here* #ifdef _WIN32 @@ -56,6 +57,8 @@ int main(int argc, char *argv[]) SSL_library_init(); SSL_load_error_strings(); ERR_load_BIO_strings(); + ERR_load_crypto_strings(); + SSL_load_error_strings(); OpenSSL_add_all_digests(); const char* sFilename = "config.txt"; diff --git a/crypto/soft_aes.c b/crypto/soft_aes.c index b8309cf..aba7c20 100644 --- a/crypto/soft_aes.c +++ b/crypto/soft_aes.c @@ -195,6 +195,13 @@ static inline void sub_word(uint8_t* key) key[3] = Sbox[key[3]]; } +#ifdef __clang__ +uint32_t _rotr(uint32_t value, uint32_t amount) +{ + return (value >> amount) | (value << ((32 - amount) & 31)); +} +#endif + __m128i soft_aeskeygenassist(__m128i key, uint8_t rcon) { uint32_t X1 = _mm_cvtsi128_si32(_mm_shuffle_epi32(key, 0x55));