From 31f77d71aff16e35926c9e54385f36e89f2fddad Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Fri, 18 May 2018 15:06:46 +0200 Subject: [PATCH] Contribs: update libdsm to 0.3.0 --- ...netbios-use-time-instead-of-clock_gettime.patch | 68 ---------------------- .../0001-pkg-config-don-t-hardcode-liconv.patch | 23 -------- contrib/src/libdsm/SHA512SUMS | 2 +- contrib/src/libdsm/rules.mak | 4 +- 4 files changed, 2 insertions(+), 95 deletions(-) delete mode 100644 contrib/src/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch delete mode 100644 contrib/src/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch 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 index c55edc13cc..0000000000 --- a/contrib/src/libdsm/0001-netbios-use-time-instead-of-clock_gettime.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9bebdc7ba3da352269ff5b92a2eb568756a3105d Mon Sep 17 00:00:00 2001 -From: Thomas Guillem -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 index 5cc76e033b..0000000000 --- a/contrib/src/libdsm/0001-pkg-config-don-t-hardcode-liconv.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 284587e66a58f70fc1875306ccd077643c6c076d Mon Sep 17 00:00:00 2001 -From: Konstantin Pavlov -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) - diff --git a/contrib/src/libdsm/SHA512SUMS b/contrib/src/libdsm/SHA512SUMS index 48454b57dc..bb3a29cbb8 100644 --- a/contrib/src/libdsm/SHA512SUMS +++ b/contrib/src/libdsm/SHA512SUMS @@ -1 +1 @@ -461162010679926baa49027ceecc0fd2565ded37384290494f9511372dd51d053857585dc12d7f93451ee209f60555cc07619e881e6eaff667879ff4285f6254 libdsm-0.2.8.tar.gz +8a26a4b14ad64b55f830d39641c0879639b2086f9e5cb8d4b6b83314a778844303e4c491aafd98362a9b5ec3eaab9fe7a4cfd5580b055d93553b69b68cdece4a libdsm-0.3.0.tar.gz diff --git a/contrib/src/libdsm/rules.mak b/contrib/src/libdsm/rules.mak index 32bf47c210..69b5420cd0 100644 --- a/contrib/src/libdsm/rules.mak +++ b/contrib/src/libdsm/rules.mak @@ -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 -- 2.11.4.GIT