krb5: fix build on FreeBSD

Failed with:

```
packet.c:481:16: error: use of undeclared identifier 'ENODATA'
  481 |         return ENODATA;
      |                ^
1 error generated.
```

Fixed by applying a patch from FreeBSD ports.
This commit is contained in:
Wolfgang Walther
2025-09-24 12:30:41 +02:00
parent 77ac76b5ca
commit 45a1cbb125
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
bootstrap_cmds,
byacc, # can also use bison, but byacc has fewer dependencies
keyutils,
@@ -42,6 +43,15 @@ stdenv.mkDerivation rec {
hash = "sha256-GogyuMrZI+u/E5T2fi789B46SfRgKFpm41reyPoAU68=";
};
patches = lib.optionals stdenv.hostPlatform.isFreeBSD [
(fetchpatch {
name = "fix-missing-ENODATA.patch";
url = "https://cgit.freebsd.org/ports/plain/security/krb5-122/files/patch-lib_krad_packet.c?id=0501f716c4aff7880fde56e42d641ef504593b7d";
extraPrefix = "";
hash = "sha256-l8ev+WrDKbTqwgBRYhfJGELkCCE8mJTqVHFBvvCPvgE=";
})
];
outputs = [
"out"
"lib"