This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch crypto-174
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/crypto-174 by this push:
     new ee8034c8 Update DynamicLoader.c
ee8034c8 is described below

commit ee8034c8ac29da5c1b814559292567c86d848d9f
Author: sebbASF <[email protected]>
AuthorDate: Sun Nov 5 10:10:00 2023 +0000

    Update DynamicLoader.c
    
    [skip ci]
---
 src/main/native/org/apache/commons/crypto/DynamicLoader.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/main/native/org/apache/commons/crypto/DynamicLoader.c 
b/src/main/native/org/apache/commons/crypto/DynamicLoader.c
index 0614abea..5c3461e1 100644
--- a/src/main/native/org/apache/commons/crypto/DynamicLoader.c
+++ b/src/main/native/org/apache/commons/crypto/DynamicLoader.c
@@ -27,11 +27,7 @@ HMODULE open_library(JNIEnv *env)
 
 {
   if (!openssl) {
-#ifdef WINDOWS
-    TCHAR libraryPath = COMMONS_CRYPTO_OPENSSL_LIBRARY;
-#else
-    char *libraryPath = COMMONS_CRYPTO_OPENSSL_LIBRARY;
-#endif
+    const char *libraryPath = COMMONS_CRYPTO_OPENSSL_LIBRARY;
     jclass clazz = (*env)->FindClass(env, 
"org/apache/commons/crypto/utils/Utils");
     if (clazz) {
         jmethodID libraryPathFunc = (*env)->GetStaticMethodID(env, clazz, 
"libraryPath", "(Ljava/lang/String;)Ljava/lang/String;");
@@ -48,7 +44,7 @@ HMODULE open_library(JNIEnv *env)
 #endif
 
 #ifdef WINDOWS
-    openssl = LoadLibrary(libraryPath);
+    openssl = LoadLibrary((LPCSTR)libraryPath);
 #endif
 
   }

Reply via email to