diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-31 09:33:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-31 09:33:02 +0100 |
commit | 7f72ec81a58eb6ed217c78f4a300781450350568 (patch) | |
tree | 8f750308db7b01f1add6a9fe9522328c7dccb6e9 /src/libutil/logger.c | |
parent | 2fae860a476986fa46f1c6c33a95d8cbef832b68 (diff) | |
download | rspamd-7f72ec81a58eb6ed217c78f4a300781450350568.tar.gz rspamd-7f72ec81a58eb6ed217c78f4a300781450350568.zip |
[Feature] Use XXH64 on 64 bits platforms only
Diffstat (limited to 'src/libutil/logger.c')
-rw-r--r-- | src/libutil/logger.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c index c146198b3..8204efb10 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -82,6 +82,11 @@ static rspamd_logger_t *default_logger = NULL; } \ } while (0) +#if defined(__LP64__) || defined(_LP64) +#define XXH_ONESHOT XXH64 +#else +#define XXH_ONESHOT XXH32 +#endif static void syslog_log_function (const gchar *log_domain, const gchar *module, @@ -101,7 +106,7 @@ static void static inline guint64 rspamd_log_calculate_cksum (const gchar *message, size_t mlen) { - return XXH64 (message, mlen, rspamd_hash_seed ()); + return XXH_ONESHOT (message, mlen, rspamd_hash_seed ()); } /* |