Source: http://git.videolan.org/?p=vlc/vlc-3.0.git;a=blob_plain;f=contrib/src/upnp/use-unicode.patch
upnp: Fix interface filtering

--- upnp/upnp/src/api/upnpapi.c.orig	2017-03-17 17:21:09.510544751 +0100
+++ upnp/upnp/src/api/upnpapi.c	2017-03-17 17:21:32.742531559 +0100
@@ -3264,31 +3264,10 @@
 		}
 		if (ifname_found == 0) {
 			/* We have found a valid interface name. Keep it. */
-#ifdef UPNP_USE_MSVCPP
-			/*
-			 * Partial fix for VC - friendly name is wchar string,
-			 * but currently gIF_NAME is char string. For now try
-			 * to convert it, which will work with many (but not
-			 * all) adapters. A full fix would require a lot of
-			 * big changes (gIF_NAME to wchar string?).
-			 */
 			wcstombs(gIF_NAME, adapts_item->FriendlyName,
 				sizeof(gIF_NAME));
-#else
-			memset(gIF_NAME, 0, sizeof(gIF_NAME));
-			strncpy(gIF_NAME, adapts_item->FriendlyName,
-				sizeof(gIF_NAME) - 1);
-#endif
 			ifname_found = 1;
 		} else {
-#ifdef UPNP_USE_MSVCPP
-			/*
-			 * Partial fix for VC - friendly name is wchar string,
-			 * but currently gIF_NAME is char string. For now try
-			 * to convert it, which will work with many (but not
-			 * all) adapters. A full fix would require a lot of
-			 * big changes (gIF_NAME to wchar string?).
-			 */
 			char tmpIfName[LINE_SIZE] = { 0 };
 			wcstombs(tmpIfName, adapts_item->FriendlyName,
 				sizeof(tmpIfName));
@@ -3298,14 +3277,6 @@
 				/* This is not the interface we're looking for. */
 				continue;
 			}
-#else
-			if (strncmp
-			    (gIF_NAME, adapts_item->FriendlyName,
-			     sizeof(gIF_NAME)) != 0) {
-				/* This is not the interface we're looking for. */
-				continue;
-			}
-#endif
 		}
 		/* Loop thru this adapter's unicast IP addresses. */
 		uni_addr = adapts_item->FirstUnicastAddress;
