git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #69080 from avdv/ntopng-zhf-fix

ntopng: Add patch needed to build with newer libpcap

commite9322d43861f4dd0aa62e31e66cdd6abe117e2e0 authorMatthieu Coudron <mattator@gmail.com> dateThu 19 Sep 2019, 20:35 (7 years ago) parent90effb53b437eb
2 files changed+35−1
pkgs/tools/networking/ntopng/0003-New-libpcap-defines-SOCKET.patch+34 pkgs/tools/networking/ntopng/default.nix+1−1
pkgs/tools/networking/ntopng/0003-New-libpcap-defines-SOCKET.patchnew file+34
@@ -0,0 +1,34 @@
1+From 9cb650ea96c0e5063775071cfdae072e92c553b8 Mon Sep 17 00:00:00 2001
2+From: emanuele-f <faranda@ntop.org>
3+Date: Tue, 18 Sep 2018 12:49:57 +0200
4+Subject: [PATCH] Compilation fix with new libpcap
5+
6+SOCKET and INVALID_SOCKET are now defined in pcap.h
7+---
8+ third-party/mongoose/mongoose.c | 4 ++++
9+ 1 file changed, 4 insertions(+)
10+
11+diff --git a/third-party/mongoose/mongoose.c b/third-party/mongoose/mongoose.c
12+index 6a61cea9b..634c142e3 100644
13+--- a/third-party/mongoose/mongoose.c
14++++ b/third-party/mongoose/mongoose.c
15+@@ -247,7 +247,9 @@ struct pollfd {
16+ #define mg_rename(x, y) rename(x, y)
17+ #define mg_sleep(x) usleep((x) * 1000)
18+ #define ERRNO errno
19++#ifndef INVALID_SOCKET
20+ #define INVALID_SOCKET (-1)
21++#endif
22+
23+ /* ntop */
24+ #if ((ULONG_MAX) == (UINT_MAX))
25+@@ -270,7 +272,9 @@ struct pollfd {
26+ #endif
27+
28+ //#define INT64_FMT PRId64
29++#ifndef SOCKET
30+ typedef int SOCKET;
31++#endif
32+ #define WINCDECL
33+
34+ #endif // End of Windows and UNIX specific includes
pkgs/tools/networking/ntopng/default.nix+1−1
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
2020 patches = [
2121 ./0001-Undo-weird-modification-of-data_dir.patch
2222 ./0002-Remove-requirement-to-have-writeable-callback-dir.patch
23+ ./0003-New-libpcap-defines-SOCKET.patch
2324 ];
2425
2526 buildInputs = [ libpcap/* gnutls libgcrypt*/ libxml2 glib geoip geolite-legacy
@@ -62,6 +63,5 @@ stdenv.mkDerivation rec {
6263 license = licenses.gpl3Plus;
6364 platforms = platforms.linux ++ platforms.darwin;
6465 maintainers = [ maintainers.bjornfor ];
65− broken = true; # broken since commit "libpcap: 1.8.1 -> 1.9.0"
6666 };
6767}