diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index eccd72ceb238..ea321200fb98 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -35,7 +35,13 @@ stdenv.mkDerivation rec { }) ]; - configureFlags = [ "--with-libmount" ]; + configureFlags = [ + "--with-libmount" + ] ++ stdenv.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" + ]; # FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv # still doesn't use it