[vlc-devel] [PATCH] contrib: microdns: fix building with Winstore on 8.1

Steve Lhomme robux4 at videolabs.io
Tue Oct 24 13:58:52 CEST 2017


GetAdaptersAddresses is not available
---
 contrib/src/microdns/microdns-win81.patch | 18 ++++++++++++++++++
 contrib/src/microdns/rules.mak            |  4 ++++
 2 files changed, 22 insertions(+)
 create mode 100644 contrib/src/microdns/microdns-win81.patch

diff --git a/contrib/src/microdns/microdns-win81.patch b/contrib/src/microdns/microdns-win81.patch
new file mode 100644
index 0000000000..548c160129
--- /dev/null
+++ b/contrib/src/microdns/microdns-win81.patch
@@ -0,0 +1,18 @@
+--- microdns.nok/src/mdns.c	2017-10-19 16:49:04.886317500 +0200
++++ microdns.nok/src/mdns.c.win81	2017-10-19 16:48:35.933273300 +0200
+@@ -156,6 +156,7 @@ mdns_list_interfaces(multicast_if** pp_i
+         size_t nb_intf = 0;
+ 
+         *p_nb_intf = 0;
++#if _WIN32_WINNT >= 0x0A00 || !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+         /**
+          * https://msdn.microsoft.com/en-us/library/aa365915.aspx
+          *
+@@ -180,6 +181,7 @@ mdns_list_interfaces(multicast_if** pp_i
+                 free(res);
+                 return (MDNS_NETERR);
+         }
++#endif
+ 
+         for (current = res; current != NULL; current = current->Next) {
+                 if (!mdns_is_interface_valuable(current))
diff --git a/contrib/src/microdns/rules.mak b/contrib/src/microdns/rules.mak
index d979e2a3c0..168ed43b11 100644
--- a/contrib/src/microdns/rules.mak
+++ b/contrib/src/microdns/rules.mak
@@ -19,9 +19,13 @@ $(TARBALLS)/microdns-$(LIBMICRODNS_VERSION).tar.gz:
 
 microdns: microdns-$(LIBMICRODNS_VERSION).tar.gz .sum-microdns
 	$(UNPACK)
+ifdef HAVE_VISUALSTUDIO
+	$(APPLY) $(SRC)/microdns/microdns-win81.patch
+endif
 	$(MOVE)
 
 .microdns: microdns
+	$(RECONF)
 	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
 	cd $< && $(MAKE) install
 	touch $@
-- 
2.14.2



More information about the vlc-devel mailing list