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
    <command-line>: warning: ISO C99 requires whitespace after the macro name
    <command-line>: error: stray '\' in program
    <command-line>: error: expected ',' or ';' before '(' token
    <command-line>: 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).
This commit is contained in:
Maximilian Bosch 2021-08-23 12:12:17 +02:00
parent 7bc32b3e5c
commit 49028fb110
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -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\\)="