From dc10c551eba9c3ca2fc1abfb39fd3c94487d29ee Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 29 Oct 2017 17:02:14 -0400 Subject: [PATCH] lvm2: Enable cross-compilation --- pkgs/os-specific/linux/lvm2/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index e6d5c10341b4..310ce51936c6 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -20,7 +20,11 @@ stdenv.mkDerivation { "--enable-pkgconfig" "--enable-applib" "--enable-cmdlib" - ] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"; + ] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd" + ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes" + ]; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libudev libuuid thin-provisioning-tools ];