diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 619572ba1..e31a6f986 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -110,7 +110,10 @@ #undef NO_FILESYSTEM #define NO_FILESYSTEM -#elif defined(ANDROID) +/* ANDROID_V454 (for android studio) displays information in a textview + * and redirects printf to the textview output instead of using + * __android_log_print() */ +#elif defined(ANDROID) && !defined(ANDROID_V454) #ifdef XMALLOC_USER #include /* we're using malloc / free direct here */ #endif diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index aa86dc7ad..50dd2425c 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -172,10 +172,16 @@ _Pragma("GCC diagnostic ignored \"-Wunused-function\"") #endif #include - #define printf(...) \ + #ifdef ANDROID_V454 /* See fips/android/wolfCrypt_v454_android */ + #ifndef NO_FILESYSTEM + #define NO_FILESYSTEM /* Turn off tests that want to call SaveDerAndPem() */ + #endif + #else + #define printf(...) \ __android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__) - #define fprintf(fp, ...) \ + #define fprintf(fp, ...) \ __android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__) + #endif #elif defined(WOLFSSL_DEOS) #include #undef printf