From cf73a5c9dd29795c5ee96581a747f0ea419c0ab5 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sun, 21 Sep 2025 02:42:44 +0300 Subject: [PATCH] vsftpd: fix build with gcc15 - add patch from fedora, fixing `setup_bio_callbacks` definition Fixes build failure with gcc15: ``` ssl.c: In function 'ssl_accept': ssl.c:493:3: error: too many arguments to function 'setup_bio_callbacks'; expected 0, have 1 493 | setup_bio_callbacks(p_ssl); | ^~~~~~~~~~~~~~~~~~~ ~~~~~ ssl.c:37:13: note: declared here 37 | static void setup_bio_callbacks(); | ^~~~~~~~~~~~~~~~~~~ ssl.c: In function 'ssl_session_init': ssl.c:647:3: error: too many arguments to function 'setup_bio_callbacks'; expected 0, have 1 647 | setup_bio_callbacks(p_ssl); | ^~~~~~~~~~~~~~~~~~~ ~~~~~ ssl.c:37:13: note: declared here 37 | static void setup_bio_callbacks(); | ^~~~~~~~~~~~~~~~~~~ ssl.c: At top level: ssl.c:692:13: error: conflicting types for 'setup_bio_callbacks'; have 'void(SSL *)' {aka 'void(struct ssl_st *)'} 692 | static void setup_bio_callbacks(SSL* p_ssl) | ^~~~~~~~~~~~~~~~~~~ ssl.c:37:13: note: previous declaration of 'setup_bio_callbacks' with type 'void(void)' 37 | static void setup_bio_callbacks(); | ^~~~~~~~~~~~~~~~~~~ ``` --- pkgs/by-name/vs/vsftpd/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/vs/vsftpd/package.nix b/pkgs/by-name/vs/vsftpd/package.nix index aed7cb231734..ef58bf50b021 100644 --- a/pkgs/by-name/vs/vsftpd/package.nix +++ b/pkgs/by-name/vs/vsftpd/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, libcap, libseccomp, openssl, @@ -27,7 +28,16 @@ stdenv.mkDerivation rec { libxcrypt ]; - patches = [ ./CVE-2015-1419.patch ]; + patches = [ + ./CVE-2015-1419.patch + + # Fix build with gcc15 + (fetchpatch { + name = "vsftpd-correct-the-definition-of-setup_bio_callbacks-in-ssl.patch"; + url = "https://src.fedoraproject.org/rpms/vsftpd/raw/c31087744900967ff4d572706a296bf6c8c4a68e/f/0076-Correct-the-definition-of-setup_bio_callbacks-in-ssl.patch"; + hash = "sha256-eYiY2eKQ+qS3CiRZYGuRHcnAe32zLDdb/GwF6NyHch4="; + }) + ]; postPatch = '' sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h