diff --git a/pkgs/tools/graphics/scanbd/default.nix b/pkgs/tools/graphics/scanbd/default.nix index 2f2d0523469e..3f2331a0de04 100644 --- a/pkgs/tools/graphics/scanbd/default.nix +++ b/pkgs/tools/graphics/scanbd/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation rec { "--enable-udev" "--with-scanbdconfdir=/etc/scanbd" "--with-systemdsystemunitdir=$out/lib/systemd/system" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # AC_FUNC_MALLOC is broken on cross builds. + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes" ]; enableParallelBuilding = true;