From 0b237dfbf74299206ae6bdf3069d15e09b9da667 Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 19 May 2026 19:43:24 +0000 Subject: [PATCH] libcddb: fix build with llvm22 switch variable from size_t to socklen_t for use in getsockopt(3) to appease -Wincompatible-pointer-types --- audio/libcddb/Makefile | 2 +- audio/libcddb/patches/patch-lib_cddb_net_c | 16 ++++++++++++++++ audio/libcddb/pkg/PLIST | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 audio/libcddb/patches/patch-lib_cddb_net_c diff --git a/audio/libcddb/Makefile b/audio/libcddb/Makefile index 2c72d92ae0b..13cbe8e1d2d 100644 --- a/audio/libcddb/Makefile +++ b/audio/libcddb/Makefile @@ -3,7 +3,7 @@ COMMENT= library to access data on a CDDB server DISTNAME= libcddb-1.3.2 CATEGORIES= audio devel SHARED_LIBS += cddb 0.1 # .4.3 -REVISION= 1 +REVISION= 2 HOMEPAGE= https://libcddb.sourceforge.net/ diff --git a/audio/libcddb/patches/patch-lib_cddb_net_c b/audio/libcddb/patches/patch-lib_cddb_net_c new file mode 100644 index 00000000000..d9424bc14ac --- /dev/null +++ b/audio/libcddb/patches/patch-lib_cddb_net_c @@ -0,0 +1,16 @@ +Fix build with llvm22: + +error: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'socklen_t *' (aka 'unsigned int *') [-Wincompatible-pointer-types] + +Index: lib/cddb_net.c +--- lib/cddb_net.c.orig ++++ lib/cddb_net.c +@@ -305,7 +305,7 @@ int timeout_connect(int sockfd, const struct sockaddr + int rv; + fd_set wfds; + struct timeval tv; +- size_t l; ++ socklen_t l; + + /* set up select time out */ + tv.tv_sec = timeout; diff --git a/audio/libcddb/pkg/PLIST b/audio/libcddb/pkg/PLIST index 77d16b45cf2..1a7214081ba 100644 --- a/audio/libcddb/pkg/PLIST +++ b/audio/libcddb/pkg/PLIST @@ -10,7 +10,7 @@ include/cddb/cddb_log.h include/cddb/cddb_site.h include/cddb/cddb_track.h include/cddb/version.h -lib/libcddb.a +@static-lib lib/libcddb.a lib/libcddb.la @lib lib/libcddb.so.${LIBcddb_VERSION} lib/pkgconfig/libcddb.pc