mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
commit
ed136c9d8b
4
UPnP.cpp
4
UPnP.cpp
@ -42,8 +42,8 @@ void (*freeUPNPDevlistFunc) (struct UPNPDev *);
|
||||
void (*FreeUPNPUrlsFunc) (struct UPNPUrls *);
|
||||
|
||||
// Nice approach http://stackoverflow.com/a/21517513/673826
|
||||
template<typename F>
|
||||
F GetKnownProcAddressImpl(HMODULE hmod, const char *name, F) {
|
||||
template<class M, typename F>
|
||||
F GetKnownProcAddressImpl(M hmod, const char *name, F) {
|
||||
auto proc = reinterpret_cast<F>(dlsym(hmod, name));
|
||||
if (!proc) {
|
||||
LogPrint("Error resolving ", name, " from UPNP library. This often happens if there is version mismatch!");
|
||||
|
Loading…
Reference in New Issue
Block a user