cygnusxi / CurecoinSource

Curecoin 2.0+ Source Code
https://curecoin.net
MIT License
146 stars 57 forks source link

upnpDiscover method signature has changed and build crashes. #41

Open cdberkstresser opened 5 years ago

cdberkstresser commented 5 years ago

The upnpDiscover method signature of the miniupnpc package has changed from upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int localport, int ipv6, int * error); to upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int localport, int ipv6, unsigned char ttl, int * error); causing the build to crash with MINIUPNPC_VERSION = 2.1. (E.g On Ubuntu 18.10) I added an unsigned char ttl to the function call to fix it on my machine, but it looks like there may be three method signatures to track now rather than two.

Serhii-Melnyk commented 4 years ago

on the web found patch, tried - looks like i've built it. Hooray! in /src/net.cpp:1037 "devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);" added "2" got "devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);" used info from https://github.com/bitcoin/bitcoin/commit/9f3e48e5219a09b5ddfd6883d1f0498910eff4b6.patch

it works! (disabled upnp in options, direct connection, no router used) synchronizing...

Serhii-Melnyk commented 4 years ago

i'm totally not a programmer hope this wont break something :)