diff options
| author | 2021-06-19 19:47:52 +0100 | |
|---|---|---|
| committer | 2021-06-19 19:47:52 +0100 | |
| commit | ab31e370020653a280e0d06945eab2c110f25a2d (patch) | |
| tree | f42a010a33eecaf0212be6b269f6f335f1ed6f1f /src/modules | |
| parent | Reorder <limits> alphabetically in the example config. (diff) | |
Fix building the sha256 module on Haiku.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_sha256.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp index 5cb55468a..b8d8ff269 100644 --- a/src/modules/m_sha256.cpp +++ b/src/modules/m_sha256.cpp @@ -26,6 +26,7 @@ /// $CompilerFlags: -Ivendor_directory("sha2") /// $CompilerFlags: require_compiler("GCC") -Wno-long-long + #ifdef __GNUC__ # pragma GCC diagnostic push #endif @@ -37,15 +38,25 @@ # pragma GCC diagnostic ignored "-Wlong-long" #endif -#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 + #ifdef __GNUC__ # pragma GCC diagnostic pop #endif +#include "inspircd.h" +#include "modules/hash.h" + class HashSHA256 : public HashProvider { public: |
