From 49028fb110ffb19e5326879d7ec6245ebd0315d2 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 23 Aug 2021 12:12:17 +0200 Subject: [PATCH] findutils: fix build w/glibc-2.34 This "-D__nonnull\\(params\\)=" leads to a compilation failure in e.g. the configure phase: configure:21131: gcc -c -D__nonnull\(params\)= conftest.c >&5 : warning: ISO C99 requires whitespace after the macro name : error: stray '\' in program : error: expected ',' or ';' before '(' token : error: stray '\' in program According to the commit this isn't even needed on Linux. I confirmed that this is an (expectable) glibc-2.34 thing by checking that * the issue doesn't occur with gcc 10/11 on a recent glibc-2.33 staging. * the issue DOES occur in a docker container with Fedora rawhide (which has glibc 2.34 and gcc 11). --- pkgs/tools/misc/findutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 3746c4b4657f..56d710c85454 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { "--localstatedir=/var/cache" ]; - CFLAGS = [ + CFLAGS = lib.optionals stdenv.isDarwin [ # TODO: Revisit upstream issue https://savannah.gnu.org/bugs/?59972 # https://github.com/Homebrew/homebrew-core/pull/69761#issuecomment-770268478 "-D__nonnull\\(params\\)="