[vlc-commits] [Git][videolan/vlc][master] contrib: cddb: add gcc14 support

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat May 24 11:43:47 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
674d2da4 by Khalid Masum at 2025-05-24T09:49:40+00:00
contrib: cddb: add gcc14 support

Since  GCC14, GCC no longer allows implicitly casting all pointer types
to all other pointer types. This behavior is now restricted to the
* type and its qualified variations.

https://www.gnu.org/software/gcc/gcc-14/porting_to.html#incompatible-pointer-types

This causes cddb fail to build on gcc14. This patch fixes that.

- - - - -


2 changed files:

- + contrib/src/cddb/cddb-gcc14-getsockoptfix.patch
- contrib/src/cddb/rules.mak


Changes:

=====================================
contrib/src/cddb/cddb-gcc14-getsockoptfix.patch
=====================================
@@ -0,0 +1,37 @@
+*size_t cannot be passed into getsockopt since gcc14
+
+--- b/lib/cddb_net.c	2025-02-28 13:13:17.680209272 +0000
++++ a/lib/cddb_net.c	2025-02-28 13:15:19.318977753 +0000
+@@ -268,7 +268,7 @@
+             int rv;
+             fd_set wfds;
+             struct timeval tv;
+-            size_t l;
++            socklen_t l;
+
+             /* set up select time out */
+             tv.tv_sec = timeout;
+--- a/configure.ac.orig	2025-03-06 10:32:40.974509646 +0000
++++ b/configure.ac	2025-03-09 10:13:07.446501285 +0000
+@@ -133,6 +133,21 @@
+ fi
+ AC_SUBST(with_iconv)
+
++dnl Check for socklen_t type
++AC_CHECK_TYPE([socklen_t],
++  [],
++  [AC_DEFINE([socklen_t], [int], [Define to `int' if <sys/socket.h> does not define it.])],
++  [[
++#if defined(_WIN32)
++# include <winsock2.h>
++# include <ws2tcpip.h>
++#else
++# include <sys/types.h>
++# include <sys/socket.h>
++#endif
++  ]]
++)
++
+ dnl Check and add some GCC specific warning flags
+ dnl - we do this as the last thing so that a possible -Werror flag
+ dnl - does not cause a failure in one of the other tests above


=====================================
contrib/src/cddb/rules.mak
=====================================
@@ -24,6 +24,7 @@ cddb: libcddb-$(CDDB_VERSION).tar.bz2 .sum-cddb
 	$(APPLY) $(SRC)/cddb/cddb-no-alarm.patch
 	$(APPLY) $(SRC)/cddb/fix-header-guards.patch
 	$(APPLY) $(SRC)/cddb/no-gettext.patch
+	$(APPLY) $(SRC)/cddb/cddb-gcc14-getsockoptfix.patch
 	# Avoid relying on iconv.m4 from gettext, when reconfiguring.
 	# This is only used by the frontend which we disable.
 	sed -i.orig 's/^[[:blank:]]*AM_ICONV/#&/' $(UNPACK_DIR)/configure.ac



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/674d2da4f3bb6806a5ba17b9b8106aca7006a1a1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/674d2da4f3bb6806a5ba17b9b8106aca7006a1a1
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