@@ -576,7 +576,7 @@ static gsize | |||
rspamd_cryptobox_auth_ctx_len (enum rspamd_cryptobox_mode mode) | |||
{ | |||
if (G_LIKELY (mode == RSPAMD_CRYPTOBOX_MODE_25519)) { | |||
return sizeof (crypto_onetimeauth_state) + alignof (crypto_onetimeauth_state); | |||
return sizeof (crypto_onetimeauth_state) + _Alignof (crypto_onetimeauth_state); | |||
} | |||
else { | |||
#ifndef HAVE_USABLE_OPENSSL | |||
@@ -1429,13 +1429,13 @@ rspamd_cryptobox_hash_init (void *p, const guchar *key, gsize keylen) | |||
{ | |||
if (key != NULL && keylen > 0) { | |||
crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p, | |||
alignof(crypto_generichash_blake2b_state)); | |||
_Alignof(crypto_generichash_blake2b_state)); | |||
crypto_generichash_blake2b_init (st, key, keylen, | |||
crypto_generichash_blake2b_BYTES_MAX); | |||
} | |||
else { | |||
crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p, | |||
alignof(crypto_generichash_blake2b_state)); | |||
_Alignof(crypto_generichash_blake2b_state)); | |||
crypto_generichash_blake2b_init (st, key, keylen, | |||
crypto_generichash_blake2b_BYTES_MAX); | |||
} | |||
@@ -1448,7 +1448,7 @@ void | |||
rspamd_cryptobox_hash_update (void *p, const guchar *data, gsize len) | |||
{ | |||
crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p, | |||
alignof(crypto_generichash_blake2b_state)); | |||
_Alignof(crypto_generichash_blake2b_state)); | |||
crypto_generichash_blake2b_update (st, data, len); | |||
} | |||
@@ -1459,7 +1459,7 @@ void | |||
rspamd_cryptobox_hash_final (void *p, guchar *out) | |||
{ | |||
crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p, | |||
alignof(crypto_generichash_blake2b_state)); | |||
_Alignof(crypto_generichash_blake2b_state)); | |||
crypto_generichash_blake2b_final (st, out, crypto_generichash_blake2b_BYTES_MAX); | |||
} | |||
@@ -386,7 +386,7 @@ rspamd_re_cache_init (struct rspamd_re_cache *cache, struct rspamd_config *cfg) | |||
rspamd_regexp_set_cache_id (re, i); | |||
if (re_class->st == NULL) { | |||
posix_memalign ((void **)&re_class->st, alignof (rspamd_cryptobox_hash_state_t), | |||
posix_memalign ((void **)&re_class->st, _Alignof (rspamd_cryptobox_hash_state_t), | |||
sizeof (*re_class->st)); | |||
g_assert (re_class->st != NULL); | |||
rspamd_cryptobox_hash_init (re_class->st, NULL, 0); |
@@ -242,7 +242,7 @@ rspamd_multipattern_create (enum rspamd_multipattern_flags flags) | |||
struct rspamd_multipattern *mp; | |||
/* Align due to blake2b state */ | |||
posix_memalign((void **)&mp, alignof (struct rspamd_multipattern), | |||
posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), | |||
sizeof (*mp)); | |||
g_assert (mp != NULL); | |||
memset (mp, 0, sizeof (*mp)); | |||
@@ -271,7 +271,7 @@ rspamd_multipattern_create_sized (guint npatterns, | |||
struct rspamd_multipattern *mp; | |||
/* Align due to blake2b state */ | |||
posix_memalign((void **)&mp, alignof (struct rspamd_multipattern), sizeof (*mp)); | |||
posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), sizeof (*mp)); | |||
g_assert (mp != NULL); | |||
memset (mp, 0, sizeof (*mp)); | |||
mp->flags = flags; |
@@ -990,7 +990,7 @@ rspamd_lua_hash_create (const gchar *type) | |||
} | |||
else if (g_ascii_strcasecmp (type, "blake2") == 0) { | |||
h->type = LUA_CRYPTOBOX_HASH_BLAKE2; | |||
posix_memalign ((void **)&h->content.h, alignof (rspamd_cryptobox_hash_state_t), | |||
posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t), | |||
sizeof (*h->content.h)); | |||
g_assert (h->content.h != NULL); | |||
rspamd_cryptobox_hash_init (h->content.h, NULL, 0); | |||
@@ -1027,7 +1027,7 @@ rspamd_lua_hash_create (const gchar *type) | |||
} | |||
else { | |||
h->type = LUA_CRYPTOBOX_HASH_BLAKE2; | |||
posix_memalign ((void **)&h->content.h, alignof (rspamd_cryptobox_hash_state_t), | |||
posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t), | |||
sizeof (*h->content.h)); | |||
g_assert (h->content.h != NULL); | |||
rspamd_cryptobox_hash_init (h->content.h, NULL, 0); |