netrw: Fix including {stdlib,stdio,string}.h

With GCC 14 it is no longer possible to call a function that has not
been declared and thus we get build errors like these:

  netread.c:69:5: error: implicit declaration of function 'fprintf'
  netread.c:89:5: error: implicit declaration of function 'exit'
  ../version.h:37:9: error: implicit declaration of function 'puts'

Instead of ignoring this error, I looked around in the netrw code and
found that there is a STDC_HEADERS preprocessor variable that makes sure
that those includes are explicit.

The configure script confusingly calls the check "ANSI C header files",
so I made sure that the STDC_HEADERS variable really only adds
"#include" directives.

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2025-01-23 19:10:00 +01:00
parent d30faab98e
commit 13a1b39da6
No known key found for this signature in database
GPG key ID: 684089CE67EBB691

View file

@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
version = "1.3.2";
configureFlags = [
# This is to add "#include" directives for stdlib.h, stdio.h and string.h.
"ac_cv_header_stdc=yes"
"--with-checksum=${checksumType}"
];