Skip to content

Commit d2ce213

Browse files
committed
Asynchronous Release v5.2.0:
* Fix for minor issues when building on some platforms. ZD 13719
1 parent 3336884 commit d2ce213

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

wolfcrypt/src/async.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ int wc_AsyncWait(int ret, WC_ASYNC_DEV* asyncDev, word32 event_flags)
836836
return ret;
837837
}
838838

839+
#ifndef WC_NO_ASYNC_SLEEP
839840
int wc_AsyncSleep(word32 ms)
840841
{
841842
int ret = 0;
@@ -854,7 +855,7 @@ int wc_AsyncSleep(word32 ms)
854855

855856
return ret;
856857
}
857-
858+
#endif
858859

859860
/* Pthread Helpers */
860861
#ifndef WC_NO_ASYNC_THREADING

wolfssl/wolfcrypt/async.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#ifdef WOLFSSL_ASYNC_CRYPT
2929

30+
#include <wolfssl/wolfcrypt/types.h>
3031
#include <wolfssl/wolfcrypt/wolfevent.h>
3132
#ifdef HAVE_CAVIUM
3233
#include <wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h>
@@ -178,9 +179,16 @@ struct WC_ASYNC_DEV;
178179
};
179180
#endif /* !NO_DES3 */
180181

182+
#ifdef __CC_ARM
183+
#pragma push
184+
#pragma anon_unions
185+
#endif
186+
181187
typedef struct WC_ASYNC_TEST {
182188
void* ctx;
189+
#if HAVE_ANONYMOUS_INLINE_AGGREGATES
183190
union {
191+
#endif
184192
#ifdef HAVE_ECC
185193
struct AsyncCryptTestEccMake eccMake;
186194
struct AsyncCryptTestEccSign eccSign;
@@ -203,9 +211,16 @@ struct WC_ASYNC_DEV;
203211
#ifndef NO_DES3
204212
struct AsyncCryptTestDes des;
205213
#endif /* !NO_DES3 */
214+
#if HAVE_ANONYMOUS_INLINE_AGGREGATES
206215
}; /* union */
216+
#endif
207217
byte type; /* enum WC_ASYNC_TEST_TYPE */
208218
} WC_ASYNC_TEST;
219+
220+
#ifdef __CC_ARM
221+
#pragma pop
222+
#endif
223+
209224
#endif /* WOLFSSL_ASYNC_CRYPT_TEST */
210225

211226
/* Performance tuning options */

0 commit comments

Comments
 (0)