mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8244495: Some jlink tests crash on Windows after JDK-8237750
Fix of 8237750 changed the loading zip library to on-demand loading, on Windows, jlink/jimage still assume that zip has been loaded already. Fix to load zip on not loaded. Reviewed-by: kbarrett, mchung, dholmes, dcubed
This commit is contained in:
parent
6dd8443493
commit
0ef6d1dff5
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -61,7 +61,10 @@ static void* findEntry(const char* name) {
|
|||
#ifdef WIN32
|
||||
HMODULE handle = GetModuleHandle("zip.dll");
|
||||
if (handle == NULL) {
|
||||
return NULL;
|
||||
handle = LoadLibrary("zip.dll");
|
||||
}
|
||||
if (handle == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
addr = (void*) GetProcAddress(handle, name);
|
||||
return addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue