From 71890f599565d204b7d1aef90bc7db93ee32df72 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 11 Sep 2021 22:48:06 +0100 Subject: [PATCH] audit: pull upstream fix for -fno-common compiler Fixes build failure against upstream gcc (defaults -fno-common). --- pkgs/os-specific/linux/audit/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix index 6fa7ba28d8e3..a7f17e449505 100644 --- a/pkgs/os-specific/linux/audit/default.nix +++ b/pkgs/os-specific/linux/audit/default.nix @@ -37,7 +37,14 @@ stdenv.mkDerivation rec { # TODO: Remove the musl patches when # https://github.com/linux-audit/audit-userspace/pull/25 # is available with the next release. - patches = [ ./patches/weak-symbols.patch ] + patches = [ + ./patches/weak-symbols.patch + (fetchpatch { + # upstream build fix against -fno-common compilers like >=gcc-10 + url = "https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f.patch"; + sha256 = "100xa1rzkv0mvhjbfgpfm72f7c4p68syflvgc3xm6pxgrqqmfq8h"; + }) + ] ++ lib.optional stdenv.hostPlatform.isMusl [ ( let patch = fetchpatch {