Skip to content

Commit

Permalink
Merge pull request #235498 from reckenrode/getopt-clang-fix
Browse files Browse the repository at this point in the history
getopt: fix build on clang 16
  • Loading branch information
toonn authored Jun 11, 2023
2 parents 2931f3b + b7d4d9f commit 7a88c7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/tools/misc/getopt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7a88c7f

Please sign in to comment.