summaryrefslogtreecommitdiff
blob: 1850540d96fcc1763456a17e0c3f0ee2172e405c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/upnp.c b/src/upnp.c
index 553630e..fd2b30b 100644
--- a/src/upnp.c
+++ b/src/upnp.c
@@ -124,8 +124,12 @@ static void upnp_refresh() {
 	struct IGDdatas data;
 
 	char myaddr[64];
-
+#if (MINIUPNPC_API_VERSION >= 18)
+	char wnaddr[64];
+	int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr), wnaddr, sizeof(wnaddr));
+#else
 	int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr));
+#endif
 
 	if(result <= 0) {
 		logger(DEBUG_PROTOCOL, LOG_WARNING, "[upnp] No IGD found");