Skip to content

Commit 7b01dd0

Browse files
committed
OVMF: fix buils against openssl-3.0.13
Without the change the build fails on `staging-next` as https://hydra.nixos.org/build/248863953/nixlog/2/tail: /build/edk2-unvendored-src/CryptoPkg/Library/OpensslLib/openssl/crypto/property/property_parse.c:107:19: error: ‘INT64_MAX’ undeclared (first use in this function) 107 | if (v > ((INT64_MAX - (*s - '0')) / 10)) { | ^~~~~~~~~ The unbundled version of `openssl` `nixpkgs` injects into `edk2` started using `INT64_MAX` that `edk2`'s `<stdint.h>` does not provide and relies on `openssl` to define as a fallback. Let's pull in `openssl`'s own definition of those.
1 parent 6556cc0 commit 7b01dd0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkgs/development/compilers/edk2/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ edk2 = stdenv.mkDerivation rec {
5959
mkdir -p $out/CryptoPkg/Library/OpensslLib/openssl
6060
tar --strip-components=1 -xf ${buildPackages.openssl.src} -C $out/CryptoPkg/Library/OpensslLib/openssl
6161
chmod -R +w $out/
62+
63+
# Fix missing INT64_MAX include that edk2 explicitly does not provide
64+
# via it's own <stdint.h>. Let's pull in openssl's definition instead:
65+
sed -i $out/CryptoPkg/Library/OpensslLib/openssl/crypto/property/property_parse.c \
66+
-e '1i #include "internal/numbers.h"'
6267
'';
6368

6469
nativeBuildInputs = [ pythonEnv ];

0 commit comments

Comments
 (0)