[packages/vlc] - fixes for new libsmb and libnfs APIs, rel 9
baggins
baggins at pld-linux.org
Wed Aug 6 22:15:06 CEST 2025
commit 7d9af34a6dff908fa3a1e4a51256b6b7317ad1fa
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Aug 7 00:14:41 2025 +0200
- fixes for new libsmb and libnfs APIs, rel 9
libnfs.patch | 41 +++++++++++++++++++++++
libsmb2.patch | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vlc.spec | 6 +++-
3 files changed, 151 insertions(+), 1 deletion(-)
---
diff --git a/vlc.spec b/vlc.spec
index 6ab319f..bd62f86 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -68,7 +68,7 @@ Summary: VLC - a multimedia player and stream server
Summary(pl.UTF-8): VLC - odtwarzacz multimedialny oraz serwer strumieni
Name: vlc
Version: 3.0.21
-Release: 8
+Release: 9
License: GPL v2+
Group: X11/Applications/Multimedia
Source0: https://download.videolan.org/pub/videolan/vlc/%{version}/%{name}-%{version}.tar.xz
@@ -89,6 +89,8 @@ Patch12: ffmpeg6.patch
Patch13: %{name}-taglib2.patch
Patch14: %{name}-x265.patch
Patch15: %{name}-live555-update.patch
+Patch16: libsmb2.patch
+Patch17: libnfs.patch
URL: http://www.videolan.org/vlc/
%{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK}
# 1.0 for X11 or GLESv1, 1.1 for GLESv2
@@ -431,6 +433,8 @@ Akcje klienta VLC dla Solid.
%patch -P13 -p1
%patch -P14 -p1
%patch -P15 -p1
+%patch -P16 -p1
+%patch -P17 -p1
%build
%{__libtoolize}
diff --git a/libnfs.patch b/libnfs.patch
new file mode 100644
index 0000000..bd45e23
--- /dev/null
+++ b/libnfs.patch
@@ -0,0 +1,41 @@
+commit a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc
+Author: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon Dec 16 09:28:55 2024 +0100
+
+ nfs: fix libnfs API v2 support
+
+ Introduced in libnfs 6.0.0.
+
+ Co-authored-by: ronnie sahlberg <ronniesahlberg at gmail.com>
+ Co-authored-by: Thomas Guillem <thomas at gllm.fr>
+
+diff --git a/modules/access/nfs.c b/modules/access/nfs.c
+index f164cda864..3510c3fe1f 100644
+--- a/modules/access/nfs.c
++++ b/modules/access/nfs.c
+@@ -188,7 +188,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
+ else
+ {
+ p_sys->res.read.i_len = i_status;
+- memcpy(p_sys->res.read.p_buf, p_data, i_status);
++ if (p_sys->res.read.p_buf != NULL && p_data != NULL)
++ memcpy(p_sys->res.read.p_buf, p_data, i_status);
+ }
+ }
+
+@@ -208,9 +209,15 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
+ return 0;
+
+ p_sys->res.read.i_len = 0;
++#ifdef LIBNFS_API_V2
++ p_sys->res.read.p_buf = NULL;
++ if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
++ p_access) < 0)
++#else
+ p_sys->res.read.p_buf = p_buf;
+ if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
+ p_access) < 0)
++#endif
+ {
+ msg_Err(p_access, "nfs_read_async failed");
+ return 0;
diff --git a/libsmb2.patch b/libsmb2.patch
new file mode 100644
index 0000000..af89fa9
--- /dev/null
+++ b/libsmb2.patch
@@ -0,0 +1,105 @@
+diff --git a/modules/access/smb2.c b/modules/access/smb2.c
+index 1920af5ee4..793fcf92cf 100644
+--- a/modules/access/smb2.c
++++ b/modules/access/smb2.c
+@@ -119,7 +119,11 @@ struct access_sys
+ struct smb2_context * smb2;
+ struct smb2fh * smb2fh;
+ struct smb2dir * smb2dir;
++#ifdef LIBSMB2_SHARE_ENUM_V2
++ struct srvsvc_NetrShareEnum_rep *share_enum;
++#else
+ struct srvsvc_netshareenumall_rep *share_enum;
++#endif
+ uint64_t smb2_size;
+ vlc_url_t encoded_url;
+ bool eof;
+@@ -165,7 +169,7 @@ vlc_smb2_op_reset(struct vlc_smb2_op *op, struct smb2_context **smb2p)
+ }
+
+ static int
+-smb2_check_status(struct vlc_smb2_op *op, const char *psz_func, int status)
++vlc_smb2_check_status(struct vlc_smb2_op *op, const char *psz_func, int status)
+ {
+ if (status < 0)
+ {
+@@ -183,12 +187,12 @@ smb2_check_status(struct vlc_smb2_op *op, const char *psz_func, int status)
+ }
+
+ static void
+-smb2_set_error(struct vlc_smb2_op *op, const char *psz_func, int err)
++vlc_smb2_set_error(struct vlc_smb2_op *op, const char *psz_func, int err)
+ {
+ if (op->log && err != -EINTR)
+ msg_Err(op->log, "%s failed: %d, %s", psz_func, err, smb2_get_error(op->smb2));
+
+- /* Don't override if set via smb2_check_status */
++ /* Don't override if set via vlc_smb2_check_status */
+ if (op->error_status == 0)
+ op->error_status = err;
+
+@@ -198,10 +202,10 @@ smb2_set_error(struct vlc_smb2_op *op, const char *psz_func, int err)
+ }
+
+ #define VLC_SMB2_CHECK_STATUS(op, status) \
+- smb2_check_status(op, __func__, status)
++ vlc_smb2_check_status(op, __func__, status)
+
+ #define VLC_SMB2_SET_ERROR(op, func, err) \
+- smb2_set_error(op, func, err)
++ vlc_smb2_set_error(op, func, err)
+
+ #define VLC_SMB2_STATUS_DENIED(x) (x == -ECONNREFUSED || x == -EACCES)
+
+@@ -487,17 +491,33 @@ ShareEnum(stream_t *access, input_item_node_t *p_node)
+ struct vlc_readdir_helper rdh;
+ vlc_readdir_helper_init(&rdh, access, p_node);
+
++#ifdef LIBSMB2_SHARE_ENUM_V2
++ struct srvsvc_SHARE_INFO_1_CONTAINER *ctr = &sys->share_enum->ses.ShareInfo.Level1;
++ size_t ctr_count = ctr->EntriesRead;
++#else
+ struct srvsvc_netsharectr *ctr = sys->share_enum->ctr;
++ size_t ctr_count = ctr->ctr1.count;
++#endif
++
+ for (uint32_t iinfo = 0;
+- iinfo < ctr->ctr1.count && ret == VLC_SUCCESS; ++iinfo)
++ iinfo < ctr_count && ret == VLC_SUCCESS; ++iinfo)
+ {
++#ifdef LIBSMB2_SHARE_ENUM_V2
++ struct srvsvc_SHARE_INFO_1 *info = &ctr->Buffer->share_info_1[iinfo];
++ const char *name = info->netname.utf8;
++ uint32_t type = info->type;
++#else
+ struct srvsvc_netshareinfo1 *info = &ctr->ctr1.array[iinfo];
+- if (info->type & SHARE_TYPE_HIDDEN)
++ const char *name = info->name;
++ uint32_t type = info->type;
++#endif
++
++ if (type & SHARE_TYPE_HIDDEN)
+ continue;
+- switch (info->type & 0x3)
++ switch (type & 0x3)
+ {
+ case SHARE_TYPE_DISKTREE:
+- ret = AddItem(access, &rdh, info->name, ITEM_TYPE_DIRECTORY);
++ ret = AddItem(access, &rdh, name, ITEM_TYPE_DIRECTORY);
+ break;
+ }
+ }
+@@ -589,7 +609,13 @@ vlc_smb2_open_share(stream_t *access, struct smb2_context **smb2p,
+
+ int ret;
+ if (do_enum)
++ {
++#ifdef LIBSMB2_SHARE_ENUM_V2
++ ret = smb2_share_enum_async(op.smb2, SHARE_INFO_1, smb2_open_cb, &op);
++#else
+ ret = smb2_share_enum_async(op.smb2, smb2_open_cb, &op);
++#endif
++ }
+ else
+ {
+ ret = smb2_stat_async(op.smb2, smb2_url->path, &smb2_stat,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vlc.git/commitdiff/7d9af34a6dff908fa3a1e4a51256b6b7317ad1fa
More information about the pld-cvs-commit
mailing list