1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

nss: set -DNS_PTR_LE_32=1 if isILP32

A comment in RNG_RandomUpdate() (drdbg.c) says to add the
-DNS_PTR_LE_32=1 flag on ILP32 platforms.

Without this PR, pkgsCross.mips64el-linux-gnuabin32.nss fails to
build.  With this PR, it succeeds.
This commit is contained in:
Adam Joseph 2022-08-13 02:48:07 -07:00
parent 14f337afb6
commit c0a40bee00

View file

@ -103,7 +103,11 @@ stdenv.mkDerivation rec {
runHook postBuild
'';
NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" " + lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1";
NIX_CFLAGS_COMPILE =
"-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" "
+ lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1"
+ lib.optionalString stdenv.hostPlatform.isILP32 " -DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c
;
installPhase = ''
runHook preInstall