Backport of a patch from the branch. libnfs API v2 support
Index: Makefile =================================================================== RCS file: /cvs/ports/x11/vlc/Makefile,v retrieving revision 1.280 diff -u -p -u -p -r1.280 Makefile --- Makefile 19 Mar 2025 11:13:38 -0000 1.280 +++ Makefile 17 Apr 2025 06:28:49 -0000 @@ -9,7 +9,7 @@ CATEGORIES= x11 SITES= https://download.videolan.org/pub/videolan/vlc/${V}/ EXTRACT_SUFX= .tar.xz REVISION-jack= 0 -REVISION-main= 2 +REVISION-main= 3 USE_NOBTCFI= Yes Index: patches/patch-modules_access_nfs_c =================================================================== RCS file: patches/patch-modules_access_nfs_c diff -N patches/patch-modules_access_nfs_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-modules_access_nfs_c 17 Apr 2025 06:28:49 -0000 @@ -0,0 +1,32 @@ +- nfs: fix libnfs API v2 support + 41f1c168a5a9c5ac5c88ecbbe0f8f4ddef8b999f + +Index: modules/access/nfs.c +--- modules/access/nfs.c.orig ++++ modules/access/nfs.c +@@ -189,7 +189,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, v + 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); + } + } + +@@ -209,9 +210,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;