mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
libedit: manually define __STDC_ISO_10646__ to fix the build issue against musl
Musl is ISO 10646 compliant but doesn't define __STDC_ISO_10646__ we need to do it ourselves.
This commit is contained in:
parent
993f056be6
commit
cb202d19e4
@ -14,6 +14,17 @@ stdenv.mkDerivation rec {
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
# NROFF = "${groff}/bin/nroff";
|
||||
|
||||
# GCC automatically include `stdc-predefs.h` while Clang does not do
|
||||
# this by default. While Musl is ISO 10646 compliant, doesn't define
|
||||
# __STDC_ISO_10646__. This definition is in `stdc-predefs.h` that's
|
||||
# why libedit builds just fine with GCC and Musl.
|
||||
# There is a DR to fix this issue with Clang which is not merged
|
||||
# yet.
|
||||
# https://reviews.llvm.org/D137043
|
||||
NIX_CFLAGS_COMPILE = lib.optional
|
||||
(stdenv.targetPlatform.isMusl && stdenv.cc.isClang)
|
||||
"-D__STDC_ISO_10646__=201103L";
|
||||
|
||||
patches = [ ./01-cygwin.patch ];
|
||||
|
||||
propagatedBuildInputs = [ ncurses ];
|
||||
|
Loading…
Reference in New Issue
Block a user