Contribs: update libdsm to 0.3.0
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 18 May 2018 13:06:46 +0000 (15:06 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 18 May 2018 13:07:01 +0000 (15:07 +0200)
contrib/src/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch [deleted file]
contrib/src/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch [deleted file]
contrib/src/libdsm/SHA512SUMS
contrib/src/libdsm/rules.mak

diff --git a/contrib/src/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch b/contrib/src/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch
deleted file mode 100644 (file)
index c55edc1..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 9bebdc7ba3da352269ff5b92a2eb568756a3105d Mon Sep 17 00:00:00 2001
-From: Thomas Guillem <thomas@gllm.fr>
-Date: Mon, 12 Feb 2018 10:46:51 +0100
-Subject: [PATCH] netbios: use time() instead of clock_gettime()
-
-We don't need more than second precisions and this function is available on
-more platforms.
----
- src/netbios_ns.c | 11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/src/netbios_ns.c b/src/netbios_ns.c
-index ff37c55..89992ee 100644
---- a/src/netbios_ns.c
-+++ b/src/netbios_ns.c
-@@ -831,7 +831,6 @@ static void *netbios_ns_discover_thread(void *opaque)
-     netbios_ns *ns = (netbios_ns *) opaque;
-     while (true)
-     {
--        struct timespec tp;
-         const int remove_timeout = 5 * ns->discover_broadcast_timeout;
-         netbios_ns_entry  *entry, *entry_next;
-@@ -840,12 +839,12 @@ static void *netbios_ns_discover_thread(void *opaque)
-         // check if cached entries timeout, the timeout value is 5 times the
-         // broadcast timeout.
--        clock_gettime(CLOCK_REALTIME, &tp);
-+        time_t now = time(NULL);
-         for (entry = TAILQ_FIRST(&ns->entry_queue);
-              entry != NULL; entry = entry_next)
-         {
-             entry_next = TAILQ_NEXT(entry, next);
--            if (tp.tv_sec - entry->last_time_seen > remove_timeout)
-+            if (now - entry->last_time_seen > remove_timeout)
-             {
-                 if (entry->flag & NS_ENTRY_FLAG_VALID_NAME)
-                 {
-@@ -886,7 +885,7 @@ static void *netbios_ns_discover_thread(void *opaque)
-             if (res == 0)
-                 break;
--            clock_gettime(CLOCK_REALTIME, &tp);
-+            time_t now = time(NULL);
-             if (name_query.type == NAME_QUERY_TYPE_NB)
-             {
-@@ -899,7 +898,7 @@ static void *netbios_ns_discover_thread(void *opaque)
-                     if (!entry)
-                         return NULL;
-                 }
--                entry->last_time_seen = tp.tv_sec;
-+                entry->last_time_seen = now;
-                 // if entry is already valid, don't send NBSTAT query
-                 if (entry->flag & NS_ENTRY_FLAG_VALID_NAME)
-@@ -922,7 +921,7 @@ static void *netbios_ns_discover_thread(void *opaque)
-                 if (!entry)
-                     continue;
--                entry->last_time_seen = tp.tv_sec;
-+                entry->last_time_seen = now;
-                 send_callback = !(entry->flag & NS_ENTRY_FLAG_VALID_NAME);
--- 
-2.11.0
-
diff --git a/contrib/src/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch b/contrib/src/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch
deleted file mode 100644 (file)
index 5cc76e0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-From 284587e66a58f70fc1875306ccd077643c6c076d Mon Sep 17 00:00:00 2001
-From: Konstantin Pavlov <thresh@videolan.org>
-Date: Sun, 11 Feb 2018 14:56:38 +0300
-Subject: [PATCH] pkg-config: don't hardcode -liconv.
-
-It's not available everywhere.
----
- libdsm.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libdsm.pc.in b/libdsm.pc.in
-index df022d5..cc9b22a 100644
---- a/libdsm.pc.in
-+++ b/libdsm.pc.in
-@@ -8,4 +8,4 @@ Description: Minimalist and read-only smb client library
- Version: @BDSM_PACKAGE_VERSION@
- Cflags: -I${includedir} @PTHREAD_CFLAGS@
- Libs: -L${libdir} -ldsm
--Libs.private: -liconv -ltasn1 @PTHREAD_LIBS@ @BDSM_LIB_LOG@ @SOCKET_LIBS@
-+Libs.private: @LIBICONV@ -ltasn1 @PTHREAD_LIBS@ @BDSM_LIB_LOG@ @SOCKET_LIBS@
--- 
-2.14.3 (Apple Git-98)
-
index 48454b5..bb3a29c 100644 (file)
@@ -1 +1 @@
-461162010679926baa49027ceecc0fd2565ded37384290494f9511372dd51d053857585dc12d7f93451ee209f60555cc07619e881e6eaff667879ff4285f6254  libdsm-0.2.8.tar.gz
+8a26a4b14ad64b55f830d39641c0879639b2086f9e5cb8d4b6b83314a778844303e4c491aafd98362a9b5ec3eaab9fe7a4cfd5580b055d93553b69b68cdece4a  libdsm-0.3.0.tar.gz
index 32bf47c..69b5420 100644 (file)
@@ -1,7 +1,7 @@
 # libdsm
 
 #LIBDSM_GITURL := git://github.com/videolabs/libdsm.git
-LIBDSM_VERSION := 0.2.8
+LIBDSM_VERSION := 0.3.0
 LIBDSM_URL := https://github.com/videolabs/libdsm/releases/download/v$(LIBDSM_VERSION)/libdsm-$(LIBDSM_VERSION).tar.gz
 
 ifeq ($(call need_pkg,"libdsm >= 0.2.0"),)
@@ -20,8 +20,6 @@ endif
 
 libdsm: libdsm-$(LIBDSM_VERSION).tar.gz .sum-libdsm
        $(UNPACK)
-       $(APPLY) $(SRC)/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch
-       $(APPLY) $(SRC)/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch
        $(MOVE)
 
 DEPS_libdsm = libtasn1 iconv