[vlc-devel] [PATCH 1/2] contrib: microdns: update to 0.1.0

Thomas Guillem thomas at gllm.fr
Thu Aug 22 17:28:12 CEST 2019


---
 .../0001-build-fix-getifaddrs-detection.patch | 79 -------------------
 .../0002-fix-dummy-mdns_list_interfaces.patch | 33 --------
 contrib/src/microdns/SHA512SUMS               |  2 +-
 contrib/src/microdns/rules.mak                |  4 +-
 4 files changed, 2 insertions(+), 116 deletions(-)
 delete mode 100644 contrib/src/microdns/0001-build-fix-getifaddrs-detection.patch
 delete mode 100644 contrib/src/microdns/0002-fix-dummy-mdns_list_interfaces.patch

diff --git a/contrib/src/microdns/0001-build-fix-getifaddrs-detection.patch b/contrib/src/microdns/0001-build-fix-getifaddrs-detection.patch
deleted file mode 100644
index 0b6d93c2c9..0000000000
--- a/contrib/src/microdns/0001-build-fix-getifaddrs-detection.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From b9b10be3ea0e7ffe660747f35f11dc6b896883fc Mon Sep 17 00:00:00 2001
-From: Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com>
-Date: Tue, 11 Sep 2018 17:38:25 +0200
-Subject: [PATCH 1/2] build: fix getifaddrs detection
-
-Before this was determined by the presence of a struct member, but for
-android target, the NDK will provide the struct but not necessarily the
-related functions.
----
- compat/compat.h | 2 +-
- configure.ac    | 7 ++-----
- src/mdns.c      | 6 +++---
- 3 files changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/compat/compat.h b/compat/compat.h
-index ef4103c..dd78134 100644
---- a/compat/compat.h
-+++ b/compat/compat.h
-@@ -99,7 +99,7 @@ typedef DWORD multicast_if;
- 
- #else
- 
--# if HAVE_IFADDRS
-+# if HAVE_IFADDRS_H
- #include <ifaddrs.h>
- typedef struct sockaddr_storage multicast_if;
- # else
-diff --git a/configure.ac b/configure.ac
-index 489e233..f0b3be2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -257,11 +257,8 @@ AC_CHECK_TYPES([struct pollfd],,,
- #endif
- ])
- 
--
--AC_CHECK_MEMBER([struct ifaddrs.ifa_addr],[
--    AC_DEFINE([HAVE_IFADDRS],[1],[Define to 1 if you have ifaddrs.ifa_addr function])],
--    [],[[#include <ifaddrs.h>]])
--
-+AC_CHECK_FUNCS([getifaddrs])
-+AC_CHECK_HEADERS([ifaddrs.h])
- 
- AC_SUBST([LIBSOCKET])
- 
-diff --git a/src/mdns.c b/src/mdns.c
-index 55c5cb4..d3c29b1 100644
---- a/src/mdns.c
-+++ b/src/mdns.c
-@@ -73,7 +73,7 @@ extern void rr_print(const struct rr_entry *);
- extern void rr_free(struct rr_entry *);
- 
- #ifndef _WIN32
--#if HAVE_IFADDRS
-+#if HAVE_GETIFADDRS
- 
- static bool
- mdns_is_interface_valuable(struct ifaddrs* ifa)
-@@ -139,7 +139,7 @@ mdns_list_interfaces(multicast_if** pp_intfs, size_t* p_nb_intf, int ai_family)
-         *p_nb_intf = 1;
-         return (0);
- }
--#endif // HAVE_IFADDRS
-+#endif // HAVE_GETIFADDRS
- 
- #else // _WIN32
- 
-@@ -332,7 +332,7 @@ mdns_init(struct mdns_ctx **p_ctx, const char *addr, unsigned short port)
-                     return mdns_destroy(ctx), (MDNS_NETERR);
-             }
- 
--#if defined(HAVE_IFADDRS) || defined(_WIN32)
-+#if defined(HAVE_GETIFADDRS) || defined(_WIN32)
-             if (setsockopt(ctx->conns[i].sock,
-                            ctx->conns[i].family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6,
-                            ctx->conns[i].family == AF_INET ? IP_MULTICAST_IF : IPV6_MULTICAST_IF,
--- 
-2.19.1
-
diff --git a/contrib/src/microdns/0002-fix-dummy-mdns_list_interfaces.patch b/contrib/src/microdns/0002-fix-dummy-mdns_list_interfaces.patch
deleted file mode 100644
index 3644df97fb..0000000000
--- a/contrib/src/microdns/0002-fix-dummy-mdns_list_interfaces.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f5a9f81eb7635fb3bb31a305e88cf02f0b9ec7b3 Mon Sep 17 00:00:00 2001
-From: Thomas Guillem <thomas at gllm.fr>
-Date: Tue, 23 Oct 2018 13:56:47 +0200
-Subject: [PATCH 2/2] fix dummy mdns_list_interfaces
-
-In case multicast_if is a valid struct and not a void *. This can happen when
-getifaddr headers are present but not the function.
----
- src/mdns.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/mdns.c b/src/mdns.c
-index d3c29b1..e499195 100644
---- a/src/mdns.c
-+++ b/src/mdns.c
-@@ -132,10 +132,11 @@ mdns_list_interfaces(multicast_if** pp_intfs, size_t* p_nb_intf, int ai_family)
- static size_t
- mdns_list_interfaces(multicast_if** pp_intfs, size_t* p_nb_intf, int ai_family)
- {
--        *pp_intfs = malloc(sizeof(**pp_intfs));
--        if (*pp_intfs == NULL)
-+        multicast_if *intfs;
-+        *pp_intfs = intfs = malloc(sizeof(*intfs));
-+        if (intfs == NULL)
-                 return (MDNS_ERROR);
--        **pp_intfs = NULL;
-+        memset(intfs, 0, sizeof(*intfs));
-         *p_nb_intf = 1;
-         return (0);
- }
--- 
-2.19.1
-
diff --git a/contrib/src/microdns/SHA512SUMS b/contrib/src/microdns/SHA512SUMS
index d309a2162e..42aba137a5 100644
--- a/contrib/src/microdns/SHA512SUMS
+++ b/contrib/src/microdns/SHA512SUMS
@@ -1 +1 @@
-47faa9d6342d3ae2b138009765a5a684e2c2474e53de15dc1deb88f87dbe558e79ab392f71971ee162eac3cf995f26ed35a74d6abfaf074dc1a249d042843954  microdns-0.0.10.tar.gz
+a3378047626584f3292ab884d4d9d79f928ca9adfb59f1e36cce3677dc706b1ae9d43612f56b223169c01f3f04090a829f5a06c7f1bac76dfa79f1426bb151fa  microdns-0.1.0.tar.gz
diff --git a/contrib/src/microdns/rules.mak b/contrib/src/microdns/rules.mak
index e6a766d844..c62bc9125f 100644
--- a/contrib/src/microdns/rules.mak
+++ b/contrib/src/microdns/rules.mak
@@ -1,6 +1,6 @@
 # libmicrodns
 
-LIBMICRODNS_VERSION := 0.0.10
+LIBMICRODNS_VERSION := 0.1.0
 LIBMICRODNS_URL := https://github.com/videolabs/libmicrodns/releases/download/$(LIBMICRODNS_VERSION)/microdns-$(LIBMICRODNS_VERSION).tar.gz
 
 ifndef HAVE_MACOSX
@@ -19,8 +19,6 @@ $(TARBALLS)/microdns-$(LIBMICRODNS_VERSION).tar.gz:
 
 microdns: microdns-$(LIBMICRODNS_VERSION).tar.gz .sum-microdns
 	$(UNPACK)
-	$(APPLY) $(SRC)/microdns/0001-build-fix-getifaddrs-detection.patch
-	$(APPLY) $(SRC)/microdns/0002-fix-dummy-mdns_list_interfaces.patch
 	$(MOVE)
 
 .microdns: microdns
-- 
2.20.1



More information about the vlc-devel mailing list