Skip to content

Commit

Permalink
pam_ssh_agent_auth: fix build with gcc14 (#368612)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcstephens authored Dec 28, 2024
2 parents 702e6e7 + 777cd45 commit d68604a
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions pkgs/by-name/pa/pam_ssh_agent_auth/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
stdenv,
nixosTests,
fetchFromGitHub,
fetchDebianPatch,
pam,
openssl,
perl,
autoreconfHook,
}:

stdenv.mkDerivation rec {
Expand All @@ -26,18 +28,50 @@ stdenv.mkDerivation rec {
sha256 = "ETFpIaWQnlYG8ZuDG2dNjUJddlvibB4ukHquTFn3NZM=";
};

# Required because of fix-configure.patch
nativeBuildInputs = [
autoreconfHook
];

buildInputs = [
pam
openssl
perl
];

patches = [
# Allow multiple colon-separated authorized keys files to be
# specified in the file= option.
./multiple-key-files.patch
./edcsa-crash-fix.patch
];
patches =
let
fetchDebianPatch' =
args:
fetchDebianPatch (
{
pname = "pam-ssh-agent-auth";
version = "0.10.3";
debianRevision = "11";
}
// args
);
in
[
# Allow multiple colon-separated authorized keys files to be
# specified in the file= option.
./multiple-key-files.patch
./edcsa-crash-fix.patch

# Patch configure to remove implicit function declaration errors under gcc14
# Requires autoreconfHook
(fetchDebianPatch' {
patch = "fix-configure.patch";
hash = "sha256-ymXv2o/NpFeVQ6r0hvJEeMpvs5Ht9jq4RSw8ssv43FY=";
})

# Avoided incompatible pointer passing to fix GCC 14 build errors. Add missing 'const', cast to expected pointer type (DSA_SIG) and avoid
# pointer to pointer when pointer is required.
(fetchDebianPatch' {
patch = "1000-gcc-14.patch";
hash = "sha256-EvdaIhrfKZ1mB7qvNiGx/hYdthStgnhK7xvJEhhAFDQ=";
})
];

configureFlags = [
# It's not clear to me why this is necessary, but without it, you see:
Expand Down

0 comments on commit d68604a

Please sign in to comment.