From e7b692ce87447cadec0097a117e6c1407b88b95f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 Jun 2022 11:09:00 +0300 Subject: [PATCH] mlmmj: fix cross-compilation --- pkgs/servers/mail/mlmmj/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/mail/mlmmj/default.nix b/pkgs/servers/mail/mlmmj/default.nix index 89e142b04f98..aba0664b8f4f 100644 --- a/pkgs/servers/mail/mlmmj/default.nix +++ b/pkgs/servers/mail/mlmmj/default.nix @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { sha256 = "1sghqvwizvm1a9w56r34qy5njaq1c26bagj85r60h32gh3fx02bn"; }; + configureFlags = 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" + ]; + # Workaround build failure on -fno-common toolchains like upstream # gcc-10. Otherwise build fails as: # ld: getlistdelim.o:/build/mlmmj-1.3.0/src/../include/mlmmj.h:84: multiple definition of