mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
fixup! Fix UPnP for Win32
This commit is contained in:
parent
4fab07b4da
commit
60e2722a21
4
UPnP.cpp
4
UPnP.cpp
|
@ -42,8 +42,8 @@ void (*freeUPNPDevlistFunc) (struct UPNPDev *);
|
||||||
void (*FreeUPNPUrlsFunc) (struct UPNPUrls *);
|
void (*FreeUPNPUrlsFunc) (struct UPNPUrls *);
|
||||||
|
|
||||||
// Nice approach http://stackoverflow.com/a/21517513/673826
|
// Nice approach http://stackoverflow.com/a/21517513/673826
|
||||||
template<typename F>
|
template<class M, typename F>
|
||||||
F GetKnownProcAddressImpl(HMODULE hmod, const char *name, F) {
|
F GetKnownProcAddressImpl(M hmod, const char *name, F) {
|
||||||
auto proc = reinterpret_cast<F>(dlsym(hmod, name));
|
auto proc = reinterpret_cast<F>(dlsym(hmod, name));
|
||||||
if (!proc) {
|
if (!proc) {
|
||||||
LogPrint("Error resolving ", name, " from UPNP library. This often happens if there is version mismatch!");
|
LogPrint("Error resolving ", name, " from UPNP library. This often happens if there is version mismatch!");
|
||||||
|
|
Loading…
Reference in a new issue