From 4520c080cc2a20a2d12c29b6ae74d15eb99e41cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Thu, 12 Sep 2019 18:11:21 +0000 Subject: [PATCH] Define ENOSYS where it is useful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- .../crypto_aead/aegis256/aesni/aead_aegis256_aesni.c | 8 ++++---- .../crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libsodium/crypto_aead/aegis256/aesni/aead_aegis256_aesni.c b/src/libsodium/crypto_aead/aegis256/aesni/aead_aegis256_aesni.c index 93a37539..5e1a36ab 100644 --- a/src/libsodium/crypto_aead/aegis256/aesni/aead_aegis256_aesni.c +++ b/src/libsodium/crypto_aead/aegis256/aesni/aead_aegis256_aesni.c @@ -16,10 +16,6 @@ #include "private/common.h" #include "private/sse2_64_32.h" -#ifndef ENOSYS -# define ENOSYS ENXIO -#endif - #if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H) # ifdef __GNUC__ @@ -315,6 +311,10 @@ crypto_aead_aegis256_is_available(void) #else +#ifndef ENOSYS +# define ENOSYS ENXIO +#endif + int crypto_aead_aegis256_encrypt_detached(unsigned char *c, unsigned char *mac, diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 69707a68..1617edb6 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -30,10 +30,6 @@ #include #include -#ifndef ENOSYS -# define ENOSYS ENXIO -#endif - #if defined(__INTEL_COMPILER) || defined(_bswap64) #elif defined(_MSC_VER) # define _bswap64(a) _byteswap_uint64(a) @@ -919,6 +915,10 @@ crypto_aead_aes256gcm_is_available(void) #else +#ifndef ENOSYS +# define ENOSYS ENXIO +#endif + int crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, unsigned char *mac,