From 075ebe9c3c57d989d20f7e0b88343c771d54a7dc Mon Sep 17 00:00:00 2001 From: ghpzin Date: Fri, 24 Oct 2025 17:41:28 +0300 Subject: [PATCH] perlPackages.DBDPg: fix build with gcc15 - add patch from merged upstream PR: https://www.github.com/bucardo/dbdpg/pull/148 https://github.com/bucardo/dbdpg/commit/8da04f9169d017469e3a12f08322e6bd88e8f239 Upstream issue: https://www.github.com/bucardo/dbdpg/issues/135 Fixes build failure with gcc15: ``` Pg.xs: In function 'XS_DBD__Pg__db_quote': Pg.xs:330:22: error: too many arguments to function 'type_info->quote'; expected 0, have 5 330 | quoted = type_info->quote(aTHX_ to_quote, len, &retlen, imp_dbh->pg_server_version >= 80100 ? 1 : 0); | ^~~~~~~~~ In file included from Pg.h:66, from Pg.xs:14: types.h:11:15: note: declared here 11 | char* (*quote)(); | ^~~~~ ``` --- pkgs/top-level/perl-packages.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b105d6e0300a..c596022fc796 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -9846,6 +9846,16 @@ with self; hash = "sha256-jZANTA50nzchh1KmZh+w01V6sfzMjeo4TLWHw4LeIZs="; }; + patches = [ + # Fix build with gcc15 + # https://github.com/bucardo/dbdpg/pull/148 + (fetchpatch { + name = "perl-dbdpg-fix-c23-compliance.patch"; + url = "https://github.com/bucardo/dbdpg/commit/8da04f9169d017469e3a12f08322e6bd88e8f239.patch"; + hash = "sha256-MpVpaZoRgN1ABk6F6hFZvo9IkQJX2frHDygOTa0wics="; + }) + ]; + buildInputs = [ pkgs.postgresql ]; propagatedBuildInputs = [ DBI ];