1 diff --git a/source/netclient.c b/source/netclient.c
2 index 6b6f99ec9b...88d4b91077 100644
3 --- a/source/netclient.c
4 +++ b/source/netclient.c
7 device_list = upnpDiscover(2000, NULL, NULL, 0, 0, 2, NULL);
9 -# if (MINIUPNPC_API_VERSION == 17)
10 +# if (MINIUPNPC_API_VERSION >= 17)
16 if (device_list != NULL) {
18 +#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
19 rc = UPNP_GetValidIGD(device_list, &upnp_urls, &upnp_igd_datas,
20 local_host, sizeof(local_host));
22 + rc = UPNP_GetValidIGD(device_list, &upnp_urls, &upnp_igd_datas,
23 + local_host, sizeof(local_host), NULL, 0);
29 DLOG(("Found valid IGD : %s\n", upnp_urls.controlURL));
32 +#if (MINIUPNPC_API_VERSION >= 18)
34 + DLOG(("Found a (reserved?) IGD : %s\n", upnp_urls.controlURL));
35 + DLOG(("Trying to continue anyway\n"));
39 +#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
44 DLOG(("Found a (not connected?) IGD : %s\n", upnp_urls.controlURL));
45 DLOG(("Trying to continue anyway\n"));
48 +#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
53 DLOG(("UPnP device found. Is it an IGD ? : %s\n",
54 upnp_urls.controlURL));
55 DLOG(("Trying to continue anyway\n"));