netsniff-ng: Fix build against glibc 2.26
The build fails first of all because it cannot find the function body for __builtin_memset. In glibc 2.26 this is available via inclusion of string.h. Another failure was that UINT64_MAX wasn't available in staging/tools.c, which is fixed again by inclusion of stdint.h. Signed-off-by: aszlig <aszlig@nix.build> Cc: @nckx
This commit is contained in:
parent
b8abd97c3b
commit
e5bda9399d
2 changed files with 26 additions and 0 deletions
|
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1lz4hwgwdq3znlqjmvl7cw3g3ilbayn608h0hwqdf7v2jq6n67kg";
|
||||
};
|
||||
|
||||
patches = [ ./glibc-2.26.patch ];
|
||||
|
||||
buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl
|
||||
libnetfilter_conntrack libpcap libsodium liburcu ncurses perl
|
||||
pkgconfig zlib ];
|
||||
|
|
24
pkgs/tools/networking/netsniff-ng/glibc-2.26.patch
Normal file
24
pkgs/tools/networking/netsniff-ng/glibc-2.26.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff --git a/built_in.h b/built_in.h
|
||||
index da04dbd..7acc183 100644
|
||||
--- a/built_in.h
|
||||
+++ b/built_in.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#include <asm/byteorder.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef uint64_t u64;
|
||||
typedef uint32_t u32;
|
||||
diff --git a/staging/tools.c b/staging/tools.c
|
||||
index 9d2d1be..909b059 100644
|
||||
--- a/staging/tools.c
|
||||
+++ b/staging/tools.c
|
||||
@@ -55,6 +55,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "mz.h"
|
||||
+#include <stdint.h>
|
||||
|
||||
#define CMP_INT(a, b) ((a) < (b) ? -1 : (a) > (b))
|
||||
#define IPV6_MAX_RANGE_LEN strlen("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128")
|
Loading…
Reference in a new issue