From adf0ad95c9b785448278162cfcc9d922e09b30eb Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Tue, 2 May 2017 21:36:14 +0200 Subject: [PATCH 1/2] IBM xlc compiler does not like "static inline" (related to #209) --- src/headers/tomcrypt_cfg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/headers/tomcrypt_cfg.h b/src/headers/tomcrypt_cfg.h index ccfb78b..40d83e5 100644 --- a/src/headers/tomcrypt_cfg.h +++ b/src/headers/tomcrypt_cfg.h @@ -41,8 +41,8 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2); #endif -/* some compilers do not like "inline" */ -#if defined(__HP_cc) +/* some compilers do not like "inline" (or maybe "static inline"), namely: HP cc, IBM xlc */ +#if defined(__HP_cc) || defined(__xlc__) #define LTC_INLINE #elif defined(_MSC_VER) #define LTC_INLINE __inline From 421266cf5f7ed322c45751312ff0f1a5491a4d59 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Fri, 5 May 2017 09:41:27 +0200 Subject: [PATCH 2/2] fix void *orig --- src/modes/xts/xts_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modes/xts/xts_test.c b/src/modes/xts/xts_test.c index 0b887ad..7826d22 100644 --- a/src/modes/xts/xts_test.c +++ b/src/modes/xts/xts_test.c @@ -17,7 +17,9 @@ static int _xts_test_accel_xts_encrypt(const unsigned char *pt, unsigned char *c { int ret; symmetric_xts xts; - void *orig; + int (*orig)(const unsigned char *, unsigned char *, + unsigned long , unsigned char *, symmetric_key *, + symmetric_key *); /* AES can be under rijndael or aes... try to find it */ if ((xts.cipher = find_cipher("aes")) == -1) { @@ -42,7 +44,9 @@ static int _xts_test_accel_xts_decrypt(const unsigned char *ct, unsigned char *p { int ret; symmetric_xts xts; - void *orig; + int (*orig)(const unsigned char *, unsigned char *, + unsigned long , unsigned char *, symmetric_key *, + symmetric_key *); /* AES can be under rijndael or aes... try to find it */ if ((xts.cipher = find_cipher("aes")) == -1) {