hping: fix cross
hping tries to run a compiled binary to detect endianness, and also runs the end-product of the build process with `-v` for some reason after the build completes. This commit addresses both of these behaviors. Tested on: - [x] mips64el-linux-gnu (cross from x86_64-linux) - [x] aarch64-linux-gnu (cross from x86_64-linux)
This commit is contained in:
parent
419b6b2d5c
commit
c9c6fc6fec
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,13 @@ stdenv.mkDerivation rec {
|
|||
'' + lib.optionalString stdenv.isLinux ''
|
||||
sed -i -e 's|#include <net/bpf.h>|#include <pcap/bpf.h>|' \
|
||||
libpcap_stuff.c script.c
|
||||
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
substituteInPlace configure --replace 'BYTEORDER=`./byteorder -m`' BYTEORDER=${
|
||||
{
|
||||
littleEndian = "__LITTLE_ENDIAN_BITFIELD";
|
||||
bigEndian = "__BIG_ENDIAN_BITFIELD";
|
||||
}.${stdenv.hostPlatform.parsed.cpu.significantByte.name}}
|
||||
substituteInPlace Makefile.in --replace './hping3 -v' ""
|
||||
'';
|
||||
|
||||
configureFlags = [ (if withTcl then "TCLSH=${tcl}/bin/tclsh" else "--no-tcl") ];
|
||||
|
|
Loading…
Reference in a new issue