diff options
author | aunsane <aunsane@gmail.com> | 2018-07-18 00:06:49 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-07-18 00:17:42 +0300 |
commit | 5a8dadd96ca13797f67c39079ba5c4889ef8c421 (patch) | |
tree | 0532b9a3c21feb03a6a3be810f559ebf0af45947 /libs/libsodium/src/include | |
parent | 39d52f0ab12ecf2a3a5f48bf7af140db282a13a6 (diff) |
updated libsodium
Diffstat (limited to 'libs/libsodium/src/include')
-rw-r--r-- | libs/libsodium/src/include/sodium/crypto_generichash.h | 4 | ||||
-rw-r--r-- | libs/libsodium/src/include/sodium/export.h | 6 | ||||
-rw-r--r-- | libs/libsodium/src/include/sodium/private/common.h | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/libs/libsodium/src/include/sodium/crypto_generichash.h b/libs/libsodium/src/include/sodium/crypto_generichash.h index 2398fb9dbb..a5e1646fd1 100644 --- a/libs/libsodium/src/include/sodium/crypto_generichash.h +++ b/libs/libsodium/src/include/sodium/crypto_generichash.h @@ -41,6 +41,10 @@ size_t crypto_generichash_keybytes(void); SODIUM_EXPORT const char *crypto_generichash_primitive(void); +/* + * Important when writing bindings for other programming languages: + * the state address *must* be 64-bytes aligned. + */ typedef crypto_generichash_blake2b_state crypto_generichash_state; SODIUM_EXPORT diff --git a/libs/libsodium/src/include/sodium/export.h b/libs/libsodium/src/include/sodium/export.h index 0f624ae3c5..a0074fc9cb 100644 --- a/libs/libsodium/src/include/sodium/export.h +++ b/libs/libsodium/src/include/sodium/export.h @@ -2,7 +2,11 @@ #ifndef sodium_export_H #define sodium_export_H -#ifndef __GNUC__ +#include <stddef.h> +#include <stdint.h> +#include <limits.h> + +#if !defined(__clang__) && !defined(__GNUC__) # ifdef __attribute__ # undef __attribute__ # endif diff --git a/libs/libsodium/src/include/sodium/private/common.h b/libs/libsodium/src/include/sodium/private/common.h index 954d02ccd7..632fc8a73c 100644 --- a/libs/libsodium/src/include/sodium/private/common.h +++ b/libs/libsodium/src/include/sodium/private/common.h @@ -196,7 +196,7 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n) } } -#ifndef __GNUC__ +#if !defined(__clang__) && !defined(__GNUC__) # ifdef __attribute__ # undef __attribute__ # endif |