You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-p2p/amule/files/amule-2.3.2-libupnp-1.14.patch

25 lines
706 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

--- a/src/UPnPBase.cpp 2016-09-16 09:55:07.000000000 +0200
+++ b/src/UPnPBase.cpp 2020-09-03 12:37:43.861231093 +0200
@@ -824,13 +824,17 @@ m_WanService(NULL)
// Null string at first
std::ostringstream msg;
+ // Declare those here to avoid
+ // "jump to label error [-fpermissive] crosses initialization
+ // of char* ipAddress"
+ unsigned short port;
+ char *ipAddress;
+
// Start UPnP
int ret;
- char *ipAddress = NULL;
- unsigned short port = 0;
- ret = UpnpInit(ipAddress, udpPort);
+ ret = UpnpInit2(0, udpPort);
if (ret != UPNP_E_SUCCESS) {
- msg << "error(UpnpInit): Error code ";
+ msg << "error(UpnpInit2): Error code ";
goto error;
}
port = UpnpGetServerPort();