diff --git a/CMakeLists.txt b/CMakeLists.txt index b35c774c4..45fbea28f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,11 +30,13 @@ find_package (Threads) #################################################### # Let CMake choose default compiler -# Silence ranlib warning "has no symbols" -SET(CMAKE_C_ARCHIVE_CREATE " Scr ") -SET(CMAKE_CXX_ARCHIVE_CREATE " Scr ") -SET(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") -SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") +if(APPLE) + # Silence ranlib warning "has no symbols" + SET(CMAKE_C_ARCHIVE_CREATE " Scr ") + SET(CMAKE_CXX_ARCHIVE_CREATE " Scr ") + SET(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") + SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") +endif() #################################################### # Cross Compile Example diff --git a/src/ssl.c b/src/ssl.c index 2095bd781..fe7acf8bc 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -26188,7 +26188,7 @@ long wolfSSL_CTX_add_extra_chain_cert(WOLFSSL_CTX* ctx, WOLFSSL_X509* x509) idx = ctx->certChain->length; } c32to24(derSz, chain + idx); - idx += OPAQUE24_LEN, + idx += OPAQUE24_LEN; XMEMCPY(chain + idx, der, derSz); idx += derSz; #ifdef WOLFSSL_TLS13