diff options
| author | 2021-06-19 20:07:35 +0100 | |
|---|---|---|
| committer | 2021-06-19 20:07:35 +0100 | |
| commit | dce2d6a2557b5ea3f2b14fc3c89be3e3f4cfcd1a (patch) | |
| tree | 851650b1febce2028970e01492779eee9d12a4a2 /src/modules/m_sha2.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
| parent | Fix building the sha256 module on Haiku. (diff) | |
| download | inspircd++-dce2d6a2557b5ea3f2b14fc3c89be3e3f4cfcd1a.tar.gz inspircd++-dce2d6a2557b5ea3f2b14fc3c89be3e3f4cfcd1a.tar.bz2 inspircd++-dce2d6a2557b5ea3f2b14fc3c89be3e3f4cfcd1a.zip | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_sha2.cpp')
| -rw-r--r-- | src/modules/m_sha2.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/modules/m_sha2.cpp b/src/modules/m_sha2.cpp index 72a6d5530..47d5bd340 100644 --- a/src/modules/m_sha2.cpp +++ b/src/modules/m_sha2.cpp @@ -26,11 +26,21 @@ /// $CompilerFlags: -isystem vendor_directory("sha2") -#include "inspircd.h" -#include "modules/hash.h" +// Fix a collision between the Haiku uint64 typedef and the +// one from the sha2 library. +#ifdef __HAIKU__ +# define uint64 sha2_uint64 +#endif #include <sha2.c> +#ifdef __HAIKU__ +# undef uint64 +#endif + +#include "inspircd.h" +#include "modules/hash.h" + template<void (*SHA)(const unsigned char*, unsigned int, unsigned char*)> class HashSHA2 : public HashProvider { |
