[vlc-commits] [Git][videolan/vlc][master] contrib: libarchive: update to 3.7.6

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 26 12:41:14 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
78ae78c0 by Steve Lhomme at 2024-09-26T11:53:16+00:00
contrib: libarchive: update to 3.7.6

Includes our UWP patch and some CVE fixes from 3.7.4 and 3.7.5.

- - - - -


4 changed files:

- − contrib/src/libarchive/0001-Fix-usage-of-GetVolumePathNameW-in-UWP-before-20H1.patch
- + contrib/src/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
- contrib/src/libarchive/SHA512SUMS
- contrib/src/libarchive/rules.mak


Changes:

=====================================
contrib/src/libarchive/0001-Fix-usage-of-GetVolumePathNameW-in-UWP-before-20H1.patch deleted
=====================================
@@ -1,29 +0,0 @@
-From f06054ea7a576d031a5bbfea1dbd6a9a6432761e Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 18 Jun 2024 07:26:22 +0200
-Subject: [PATCH] Fix usage of GetVolumePathNameW in UWP before 20H1
-
-It started being allowed in UWP in 20H1.
----
- libarchive/archive_windows.h | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libarchive/archive_windows.h b/libarchive/archive_windows.h
-index 47b7cb8e..8187dd66 100644
---- a/libarchive/archive_windows.h
-+++ b/libarchive/archive_windows.h
-@@ -294,7 +294,10 @@ typedef int mbstate_t;
- size_t wcrtomb(char *, wchar_t, mbstate_t *);
- #endif
- 
--#if defined(_MSC_VER) && _MSC_VER < 1300
-+#if !WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) && NTDDI_VERSION < NTDDI_WIN10_VB
-+// not supported in UWP SDK before 20H1
-+#define GetVolumePathNameW(f, v, c)   (0)
-+#elif defined(_MSC_VER) && _MSC_VER < 1300
- WINBASEAPI BOOL WINAPI GetVolumePathNameW(
-        LPCWSTR lpszFileName,
-        LPWSTR lpszVolumePathName,
--- 
-2.45.0.windows.1
-


=====================================
contrib/src/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
=====================================
@@ -0,0 +1,36 @@
+From 51214b8cbd6008105fd94807dfc9c0699459e9e2 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 23 Sep 2024 13:37:22 +0200
+Subject: [PATCH] zstd: use GetNativeSystemInfo() to get the number of threads
+
+GetActiveProcessorCount() is not available in UWP [1] and
+it's not available before Windows 7.
+
+SYSTEM_INFO::dwNumberOfProcessors gives the same information [2]
+
+[1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getactiveprocessorcount
+[2] https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
+---
+ libarchive/archive_write_add_filter_zstd.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libarchive/archive_write_add_filter_zstd.c b/libarchive/archive_write_add_filter_zstd.c
+index 7ea3d18c..89b90387 100644
+--- a/libarchive/archive_write_add_filter_zstd.c
++++ b/libarchive/archive_write_add_filter_zstd.c
+@@ -280,9 +280,9 @@ archive_compressor_zstd_options(struct archive_write_filter *f, const char *key,
+ #elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && \
+     _WIN32_WINNT >= 0x0601 /* _WIN32_WINNT_WIN7 */
+ 		if (threads == 0) {
+-			DWORD winCores = GetActiveProcessorCount(
+-			    ALL_PROCESSOR_GROUPS);
+-			threads = (intmax_t)winCores;
++			SYSTEM_INFO systemInfo;
++			GetNativeSystemInfo(&systemInfo);
++			threads = (intmax_t)systemInfo.dwNumberOfProcessors;
+ 		}
+ #endif
+ 		if (threads < 0 || threads > INT_MAX) {
+-- 
+2.45.0.windows.1
+


=====================================
contrib/src/libarchive/SHA512SUMS
=====================================
@@ -1 +1 @@
-ed65e35e37d74791a480c0ed6f67ecbaa9f40ffaae38ae8388e0c6e4ff1e9f8d833345bfa3b4de7c5a2142c54adb53523a4f3fe2bcbc1079e71cc3545358cb9e  libarchive-3.7.0.tar.gz
+d55483de313e00b3855ea535dfeeb78dcfdaa48ae6d17589dbb419ead2eb5818e7a8617b73b93c810402a9ece65b416e2d73b09efbc39c02916d80b180f4200b  libarchive-3.7.6.tar.gz


=====================================
contrib/src/libarchive/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # LIBARCHIVE
-LIBARCHIVE_VERSION := 3.7.0
+LIBARCHIVE_VERSION := 3.7.6
 LIBARCHIVE_URL := $(GITHUB)/libarchive/libarchive/releases/download/v$(LIBARCHIVE_VERSION)/libarchive-$(LIBARCHIVE_VERSION).tar.gz
 
 PKGS += libarchive
@@ -36,7 +36,7 @@ $(TARBALLS)/libarchive-$(LIBARCHIVE_VERSION).tar.gz:
 
 libarchive: libarchive-$(LIBARCHIVE_VERSION).tar.gz .sum-libarchive
 	$(UNPACK)
-	$(APPLY) $(SRC)/libarchive/0001-Fix-usage-of-GetVolumePathNameW-in-UWP-before-20H1.patch
+	$(APPLY) $(SRC)/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
 	$(call pkg_static,"build/pkgconfig/libarchive.pc.in")
 	$(MOVE)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/78ae78c044e87086bc976b9c226eb6fa93e4af54

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/78ae78c044e87086bc976b9c226eb6fa93e4af54
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list