[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: zvbi: disable strncpy hack

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Thu Jun 4 14:31:17 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
1e38d000 by Steve Lhomme at 2026-06-04T15:25:11+02:00
contrib: zvbi: disable strncpy hack

strncpy() is never called in the code but the define may interfere with system headers.
In older mingw-w64 strncpy was called inline in <io.h>.

- - - - -
697ff96a by Steve Lhomme at 2026-06-04T15:25:11+02:00
package: win32: build with optimizations by default in all cases

It can be disabled manually in all cases in the CI or locally.
But once it was disabled it could not be turned back on.

Ref. #28933

- - - - -


3 changed files:

- + contrib/src/zvbi/0001-disable-strncpy-hack.patch
- contrib/src/zvbi/rules.mak
- extras/package/win32/build.sh


Changes:

=====================================
contrib/src/zvbi/0001-disable-strncpy-hack.patch
=====================================
@@ -0,0 +1,28 @@
+From 7bd5d32dd7f281d43837b2bc8605a4e5eb4dd9bc Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Wed, 3 Jun 2026 07:38:36 +0200
+Subject: [PATCH] disable strncpy hack
+
+strncpy() is never called in the code but the define may interfere with system headers.
+---
+ src/misc.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/misc.h b/src/misc.h
+index ff8e96a..3e4c0b4 100644
+--- a/src/misc.h
++++ b/src/misc.h
+@@ -432,8 +432,10 @@ _vbi_time_max			(void)
+ #ifndef HAVE_STRLCPY
+ #  define strlcpy _vbi_strlcpy
+ #endif
++/* strncpy is unused, don't mess with the toolchain headers
+ #undef strncpy
+ #define strncpy use_strlcpy_instead
++*/
+ 
+ extern size_t
+ _vbi_strlcpy			(char *			dst,
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/zvbi/rules.mak
=====================================
@@ -30,6 +30,7 @@ ifdef HAVE_ANDROID
 endif
 	# hardcode -liconv instead of the full path
 	$(APPLY) $(SRC)/zvbi/0001-configure-hardcode-liconv-instead-of-the-full-path.patch
+	$(APPLY) $(SRC)/zvbi/0001-disable-strncpy-hack.patch
 	# check for pthread_create in pthreads as well
 	sed -i.orig "s/AC_CHECK_LIB(pthread, pthread_create,,/AC_SEARCH_LIBS([pthread_create], [pthread pthreads],,/" $(UNPACK_DIR)/configure.in
 	$(MOVE)


=====================================
extras/package/win32/build.sh
=====================================
@@ -376,9 +376,6 @@ fi
 if [ -n "$BREAKPAD" ]; then
      CONTRIBFLAGS="$CONTRIBFLAGS --enable-breakpad"
 fi
-if [ "$RELEASE" != "yes" ]; then
-     CONTRIBFLAGS="$CONTRIBFLAGS --disable-optim"
-fi
 if [ -n "$DISABLEGUI" ]; then
     CONTRIBFLAGS="$CONTRIBFLAGS --disable-qt --disable-qtsvg --disable-qtdeclarative --disable-qtshadertools --disable-qtwayland"
 fi



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5a028ff2060b425efa28098b9027206bce1facfb...697ff96a3971991783798b453524e01e684df43a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5a028ff2060b425efa28098b9027206bce1facfb...697ff96a3971991783798b453524e01e684df43a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list