Skip to content

Commit 6ea22a6

Browse files
Address review comment
1 parent 5d687d3 commit 6ea22a6

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

closed/adds/jdk/src/share/native/jdk/crypto/jniprovider/NativeCrypto.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -643,21 +643,11 @@ find_crypto_library(jboolean traceEnabled, const char *chomepath)
643643

644644
/* If JAVA_HOME is not null or empty and no library has been loaded yet, try there. */
645645
if ((NULL != chomepath) && ('\0' != *chomepath) && (NULL == crypto_library)) {
646-
#if defined(__APPLE__)
647-
static const char pathSuffix[] = "/lib/";
648-
#elif defined(_WIN32) /* defined(__APPLE__) */
646+
#if defined(_WIN32)
649647
static const char pathSuffix[] = "\\bin\\";
650-
#elif defined(__aarch64__) /* defined(_WIN32) */
651-
static const char pathSuffix[] = "/lib/aarch64/";
652-
#elif defined(__ppc64__) && defined(_AIX) /* defined(__aarch64__) */
653-
static const char pathSuffix[] = "/lib/ppc64/";
654-
#elif defined(__PPC64__) && defined(__linux__) /* defined(__ppc64__) && defined(_AIX) */
655-
static const char pathSuffix[] = "/lib/ppc64le/";
656-
#elif defined(__s390x__) /* defined(__PPC64__) && defined(__linux__) */
657-
static const char pathSuffix[] = "/lib/s390x/";
658-
#else /* defined(__s390x__) */
659-
static const char pathSuffix[] = "/lib/amd64/";
660-
#endif /* defined(__APPLE__) */
648+
#else /* defined(_WIN32) */
649+
static const char pathSuffix[] = "/lib" OPENJDK_TARGET_CPU_LIBDIR "/";
650+
#endif /* defined(_WIN32) */
661651

662652
size_t path_len = strlen(chomepath) + sizeof(pathSuffix) - 1;
663653
char *libPath = malloc(path_len + 1);

jdk/make/lib/SecurityLibraries.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ ifeq ($(WITH_OPENSSL), yes)
319319
LANG := C, \
320320
OPTIMIZATION := LOW, \
321321
CFLAGS := $(CFLAGS_JDKLIB) \
322+
-DOPENJDK_TARGET_CPU_LIBDIR='"$(OPENJDK_TARGET_CPU_LIBDIR)"' \
322323
-I$(SRC_ROOT)/closed/adds/jdk/src/share/native/jdk/crypto/jniprovider \
323324
-c $(OPENSSL_CFLAGS), \
324325
MAPFILE := $(SRC_ROOT)/closed/make/mapfiles/libjncrypto/mapfile-vers, \

0 commit comments

Comments
 (0)