*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 @@ -265,10 +265,16 @@ int timeout_connect(int sockfd, const st if (connect(sockfd, addr, len) == -1) { /* check whether we can continue */ if (errno == EINPROGRESS) { +#ifdef _WIN32 + DWORD rv; +#define GETSOCKOPT_VAL_TYPE char +#else int rv; +#define GETSOCKOPT_VAL_TYPE int +#endif fd_set wfds; struct timeval tv; - size_t l; + socklen_t l; /* set up select time out */ tv.tv_sec = timeout; @@ -288,7 +294,7 @@ int timeout_connect(int sockfd, const st default: /* we got connected, check error condition */ l = sizeof(rv); - getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &rv, &l); + getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (GETSOCKOPT_VAL_TYPE*)&rv, &l); if (rv) { /* something went wrong, simulate normal connect behaviour */ errno = rv; --- 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 does not define it.])], + [[ +#if defined(_WIN32) +# include +# include +#else +# include +# include +#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