Unverified Commit b6a1d9c9 authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

dnsperf: add musl fix (#370881)

parents 4e1c04d5 df13bea6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  stdenv,
  autoreconfHook,
  fetchFromGitHub,
  fetchpatch,
  ldns,
  libck,
  nghttp2,
@@ -33,6 +34,16 @@ stdenv.mkDerivation rec {
    openssl
  ];

  patches = lib.optionals stdenv.hostPlatform.isMusl [
    # dnsperf doesn't have support for musl (https://github.com/DNS-OARC/dnsperf/issues/265)
    # and strerror_r returns int on non-glibc: https://github.com/NixOS/nixpkgs/issues/370498
    # TODO: remove if better non-glibc detection is ever upstreamed
    (fetchpatch {
      url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/5bd92b8f86a0bf15dddf8fa180adf14344d6cc15/testing/dnsperf/musl-perf_strerror_r.patch";
      hash = "sha256-yTJHXkti/xSklmVfAV45lEsOiHy7oL1phImNTNtcPkM=";
    })
  ];

  doCheck = true;

  meta = with lib; {