lsof: fix build w/musl

This commit is contained in:
Will Dietz 2018-01-14 01:38:17 -06:00
parent d67638cc13
commit 94ab0da6b1

View File

@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
patches = [ ./dfile.patch ]; patches = [ ./dfile.patch ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
'';
# Stop build scripts from searching global include paths # Stop build scripts from searching global include paths
LSOF_INCLUDE = "${stdenv.cc.libc}/include"; LSOF_INCLUDE = "${stdenv.cc.libc}/include";
configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}"; configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}";