[vlc-commits] [Git][videolan/vlc][master] 4 commits: contrib: gpg-error: use ANSI version of Environment API's as the rest of the code

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 2 09:13:58 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ed1037d9 by Steve Lhomme at 2026-04-02T07:50:38+00:00
contrib: gpg-error: use ANSI version of Environment API's as the rest of the code

When setting -DUNICODE in UWP builds it doesn't match the API.

- - - - -
a1a4b3f3 by Steve Lhomme at 2026-04-02T07:50:38+00:00
contrib: shout: Add cast on setsockopt() call

So it can match POSIX and Win32 signatures. This is the same cast done a few lines above.

- - - - -
d114c448 by Steve Lhomme at 2026-04-02T07:50:38+00:00
contrib: libdsm: Cast getsockopt pointer to match POSIX and Win32 signatures

- - - - -
126e3643 by Steve Lhomme at 2026-04-02T07:50:38+00:00
CI: update Windows LLVM images with LLVM 22.1.2

And mingw-w64 v14.0.0.

- - - - -


6 changed files:

- contrib/src/gpg-error/rules.mak
- + contrib/src/libdsm/0001-Cast-getsockopt-pointer.patch
- contrib/src/libdsm/rules.mak
- + contrib/src/shout/0001-Add-cast-on-setsockopt-call.patch
- contrib/src/shout/rules.mak
- extras/ci/gitlab-ci.yml


Changes:

=====================================
contrib/src/gpg-error/rules.mak
=====================================
@@ -33,6 +33,10 @@ libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.bz2 .sum-gpg-error
 	$(APPLY) $(SRC)/gpg-error/0013-configure-allow-building-Windows-with-disable-thread.patch
 	$(APPLY) $(SRC)/gpg-error/0014-core-disable-locking-API-with-disable-threads.patch
 	$(APPLY) $(SRC)/gpg-error/0015-core-disable-process-spawning-with-disable-threads.patch
+	# use the ANSI version of Environment API's as the rest of the code
+	sed -i.orig -e 's/ExpandEnvironmentStrings /ExpandEnvironmentStringsA /g' $(UNPACK_DIR)/src/w32-reg.c
+	sed -i.orig -e 's/SetEnvironmentVariable /SetEnvironmentVariableA /g' $(UNPACK_DIR)/src/sysutils.c
+	sed -i.orig -e 's/GetEnvironmentVariable /GetEnvironmentVariableA /g' $(UNPACK_DIR)/src/sysutils.c
 
 	$(MOVE)
 


=====================================
contrib/src/libdsm/0001-Cast-getsockopt-pointer.patch
=====================================
@@ -0,0 +1,26 @@
+From 782ab6c5a1bc0d5c2232eb61b4425713566cadf3 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 1 Apr 2026 08:43:48 +0200
+Subject: [PATCH] Cast getsockopt pointer
+
+So it can match POSIX and Win32 signatures.
+---
+ src/netbios_session.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/netbios_session.c b/src/netbios_session.c
+index 9aabf12..124eb21 100644
+--- a/src/netbios_session.c
++++ b/src/netbios_session.c
+@@ -123,7 +123,7 @@ static int open_socket_and_connect(netbios_session *s)
+ 
+             if (FD_ISSET(s->socket, &write_fds))
+             {
+-                if (getsockopt(s->socket, SOL_SOCKET, SO_ERROR, &ret,
++                if (getsockopt(s->socket, SOL_SOCKET, SO_ERROR, (void*) &ret,
+                                &(socklen_t){ sizeof (ret) }) || ret)
+                 {
+                     errno = ret;
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/libdsm/rules.mak
=====================================
@@ -16,6 +16,7 @@ libdsm: libdsm-$(LIBDSM_VERSION).tar.xz .sum-libdsm
 	$(UNPACK)
 	$(APPLY) $(SRC)/libdsm/0001-Avoid-relying-on-implicit-function-declarations.patch
 	$(APPLY) $(SRC)/libdsm/0001-use-GetCurrentProcessId-for-the-process-ID-on-Window.patch
+	$(APPLY) $(SRC)/libdsm/0001-Cast-getsockopt-pointer.patch
 	$(MOVE)
 
 DEPS_libdsm = libtasn1 $(DEPS_libtasn1) iconv $(DEPS_iconv)


=====================================
contrib/src/shout/0001-Add-cast-on-setsockopt-call.patch
=====================================
@@ -0,0 +1,26 @@
+From 19502f905828e21d90bb80e45d8a7546bdd0c2fb Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 1 Apr 2026 08:07:28 +0200
+Subject: [PATCH] Add cast on setsockopt() call
+
+So it can match POSIX and Win32 signatures. This is the same cast done a few lines above.
+---
+ src/common/net/sock.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/common/net/sock.c b/src/common/net/sock.c
+index b11bc0d..aa7aa47 100644
+--- a/src/common/net/sock.c
++++ b/src/common/net/sock.c
+@@ -743,7 +743,7 @@ sock_t sock_get_server_socket (int port, const char *sinterface)
+         setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof(on));
+         on = 0;
+ #ifdef IPV6_V6ONLY
+-        setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof on);
++        setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, (const void *)&on, sizeof on);
+ #endif
+ 
+         if (bind (sock, ai->ai_addr, ai->ai_addrlen) < 0)
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/shout/rules.mak
=====================================
@@ -33,6 +33,9 @@ libshout: libshout-$(SHOUT_VERSION).tar.gz .sum-shout
 	# don't use getpid in UWP as it's not actually available
 	$(APPLY) $(SRC)/shout/0001-Favor-GetCurrentProcessId-on-Windows.patch
 
+	# cast setsockopt
+	$(APPLY) $(SRC)/shout/0001-Add-cast-on-setsockopt-call.patch
+
 	$(call pkg_static,"shout.pc.in")
 	$(MOVE)
 


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -23,8 +23,8 @@ variables:
     VLC_TEST_TIMEOUT: 60
     FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
     VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20260127163923
-    VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20260121170706
-    VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20260121170706
+    VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20260331112916
+    VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20260331112916
     VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20260121072258
     VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20260120134731
     VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-snap:20260312133043



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f6039a85d2a52ac3e4cdbda5a04c7135e58f18ca...126e36436f6fec0f35bae4cbfd33042c348e8a7a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f6039a85d2a52ac3e4cdbda5a04c7135e58f18ca...126e36436f6fec0f35bae4cbfd33042c348e8a7a
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list