diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index 5a531bddcaff..10418d978105 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -51,7 +51,8 @@ stdenv.mkDerivation rec { "--sysconfdir=/etc" "--localstatedir=/var" ] ++ lib.optional stdenv.isLinux "--with-randomdev=/dev/random" - ++ lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ]; + ++ lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ] + ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "BUILD_CC=$(CC_FOR_BUILD)"; NIX_CFLAGS_COMPILE = builtins.toString [ "-Wno-error=pointer-compare"