dante: disable getaddrinfo() checks if cross

Prior to this commit, dante's configure-time getaddrinfo() checks
were disabled only if stdenv.hostPlatform.isMips64.

These checks must also be disabled if the buildPlatform cannot
execute hostPlatform binaries.  This commit factors out the control
of this disablement as a flag and adds an additional situation in
which that flag is enabled.
This commit is contained in:
Adam Joseph 2023-04-05 19:01:07 -07:00 committed by Artturin
parent 491667f8a9
commit 17ceaffab1

View File

@ -1,6 +1,9 @@
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook
, pam, libkrb5, cyrus_sasl, miniupnpc, libxcrypt }:
let
remove_getaddrinfo_checks = stdenv.hostPlatform.isMips64 || !(stdenv.buildPlatform.canExecute stdenv.hostPlatform);
in
stdenv.mkDerivation rec {
pname = "dante";
version = "1.4.3";
@ -19,7 +22,7 @@ stdenv.mkDerivation rec {
dontAddDisableDepTrack = stdenv.isDarwin;
patches = lib.optionals stdenv.hostPlatform.isMips64 [
patches = lib.optionals remove_getaddrinfo_checks [
(fetchpatch {
name = "0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch";
url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/dante/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch";