Merge pull request #235498 from reckenrode/getopt-clang-fix

getopt: fix build on clang 16
This commit is contained in:
toonn 2023-06-11 13:59:44 +02:00 committed by GitHub
commit 7a88c7fa54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "1zn5kp8ar853rin0ay2j3p17blxy16agpp8wi8wfg4x98b31vgyh";
};
# This should be fine on Linux and Darwin. Clang 16 requires it because otherwise getopt will
# attempt to use C library functions without declaring them, which is raised as an error.
env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
makeFlags = [
"WITHOUT_GETTEXT=1"
"LIBCGETOPT=0"