mirror of https://github.com/adamdruppe/arsd.git
fix lib name on ubuntu
This commit is contained in:
parent
59d7a30734
commit
67b66bdd40
10
http2.d
10
http2.d
|
@ -1793,15 +1793,19 @@ version(use_openssl) {
|
||||||
import core.stdc.stdio;
|
import core.stdc.stdio;
|
||||||
|
|
||||||
shared static this() {
|
shared static this() {
|
||||||
version(Posix)
|
version(Posix) {
|
||||||
|
ossllib_handle = dlopen("libssl.so.1.1", RTLD_NOW);
|
||||||
|
if(ossllib_handle is null)
|
||||||
ossllib_handle = dlopen("libssl.so", RTLD_NOW);
|
ossllib_handle = dlopen("libssl.so", RTLD_NOW);
|
||||||
else version(Windows) {
|
} else version(Windows) {
|
||||||
ossllib_handle = LoadLibraryW("libssl32.dll"w.ptr);
|
ossllib_handle = LoadLibraryW("libssl32.dll"w.ptr);
|
||||||
oeaylib_handle = LoadLibraryW("libeay32.dll"w.ptr);
|
oeaylib_handle = LoadLibraryW("libeay32.dll"w.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ossllib_handle is null)
|
if(ossllib_handle is null)
|
||||||
throw new Exception("ssl fail open");
|
throw new Exception("libssl library not found");
|
||||||
|
if(oeaylib_handle is null)
|
||||||
|
throw new Exception("libeay32 library not found");
|
||||||
|
|
||||||
foreach(memberName; __traits(allMembers, ossllib)) {
|
foreach(memberName; __traits(allMembers, ossllib)) {
|
||||||
alias t = typeof(__traits(getMember, ossllib, memberName));
|
alias t = typeof(__traits(getMember, ossllib, memberName));
|
||||||
|
|
Loading…
Reference in New Issue