From 6428b68ae5b70e602c9143f7462a18c52f669664 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 May 2025 13:23:30 +0000 Subject: [PATCH] libslirp: 4.9.0 -> 4.9.1 --- .../li/libslirp/fix-dns-for-darwin.patch | 46 ------------------- pkgs/by-name/li/libslirp/package.nix | 10 +--- 2 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 pkgs/by-name/li/libslirp/fix-dns-for-darwin.patch diff --git a/pkgs/by-name/li/libslirp/fix-dns-for-darwin.patch b/pkgs/by-name/li/libslirp/fix-dns-for-darwin.patch deleted file mode 100644 index f6e1a8c1b519..000000000000 --- a/pkgs/by-name/li/libslirp/fix-dns-for-darwin.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 735904142f95d0500c0eae6bf763e4ad24b6b9fd Mon Sep 17 00:00:00 2001 -From: Samuel Thibault -Date: Wed, 26 Mar 2025 08:42:35 +0100 -Subject: [PATCH] apple: Fix getting IPv4 DNS server address when IPv4 and IPv4 - are interleaved - -When getting an IPv4 DNS server address, if libresolv returns - -IPv4 -IPv6 -IPv4 -IPv6 - -(or just IPv4 and IPv6) - -we would still have found == 1 on the second iteration and thus take the -IPv6 even if it's not the proper af. We can as well just completely ignore -the non-matching af entries. - -Fixes #85 ---- - src/slirp.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/slirp.c b/src/slirp.c -index bccee53..62a018a 100644 ---- a/src/slirp.c -+++ b/src/slirp.c -@@ -289,9 +289,12 @@ static int get_dns_addr_libresolv(int af, void *pdns_addr, void *cached_addr, - found = 0; - DEBUG_MISC("IP address of your DNS(s):"); - for (int i = 0; i < count; i++) { -- if (af == servers[i].sin.sin_family) { -- found++; -+ if (af != servers[i].sin.sin_family) { -+ continue; - } -+ -+ found++; -+ - if (af == AF_INET) { - addr = &servers[i].sin.sin_addr; - } else { // af == AF_INET6 --- -GitLab - diff --git a/pkgs/by-name/li/libslirp/package.nix b/pkgs/by-name/li/libslirp/package.nix index 98a73e4109fe..8900e5c43d68 100644 --- a/pkgs/by-name/li/libslirp/package.nix +++ b/pkgs/by-name/li/libslirp/package.nix @@ -10,22 +10,16 @@ stdenv.mkDerivation rec { pname = "libslirp"; - version = "4.9.0"; + version = "4.9.1"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "slirp"; repo = "libslirp"; rev = "v${version}"; - sha256 = "sha256-Eqdw6epFkLv4Dnw/s1pcKW0P70ApZwx/J2VkCwn50Ew="; + sha256 = "sha256-MKP3iBExaPQryiahI1l/4bTgVht5Vu8AxaDyMotqmMo="; }; - patches = [ - # https://gitlab.freedesktop.org/slirp/libslirp/-/commit/735904142f95d0500c0eae6bf763e4ad24b6b9fd - # Vendorized due to frequent instability of the upstream repository. - ./fix-dns-for-darwin.patch - ]; - separateDebugInfo = true; nativeBuildInputs = [