- Update ntopng to 3.2.2018.01.12

- Fix build with Clang 6.0
This commit is contained in:
Guido Falsi 2018-01-18 20:09:16 +00:00
parent a5d518dcf7
commit ed3c187204
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=459371
8 changed files with 73 additions and 12 deletions

View file

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= ntopng
PORTVERSION= 3.2.2017.12.27
PORTREVISION= 1
PORTVERSION= 3.2.2018.01.12
CATEGORIES= net
MAINTAINER= madpilot@FreeBSD.org
@ -32,7 +31,7 @@ GROUPS= ntopng
USE_GITHUB= yes
GH_ACCOUNT= ntop
GH_TAGNAME= ecd5336
GH_TAGNAME= b16f3e2
CPE_VENDOR= ntop

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1514728301
SHA256 (ntop-ntopng-3.2.2017.12.27-ecd5336_GH0.tar.gz) = e7b8660c4a6aff1c13d1d85aa64b486588d9977cdcb48ffce4e15757129d2fc6
SIZE (ntop-ntopng-3.2.2017.12.27-ecd5336_GH0.tar.gz) = 24195373
TIMESTAMP = 1516263485
SHA256 (ntop-ntopng-3.2.2018.01.12-b16f3e2_GH0.tar.gz) = b72672c91d4805c3388774cd7e412f643e0c4cd0379be702f3b01bb450a76a26
SIZE (ntop-ntopng-3.2.2018.01.12-b16f3e2_GH0.tar.gz) = 24195410

View file

@ -1,10 +1,10 @@
--- Makefile.in.orig 2017-12-06 11:11:19 UTC
--- Makefile.in.orig 2018-01-12 09:48:20 UTC
+++ Makefile.in
@@ -34,7 +34,8 @@ LIBPCAP=-lpcap
MONGOOSE_HOME=${PWD}/third-party/mongoose
MONGOOSE_INC=-I$(MONGOOSE_HOME)
######
-HAS_LUAJIT=$(shell pkg-config --exists luajit; echo $$?)
-HAS_LUAJIT=$(shell pkg-config --atleast-version=2.1.0 luajit; echo $$?)
+# Force using embedded luajit
+HAS_LUAJIT=1
ifeq ($(HAS_LUAJIT), 0)

View file

@ -1,6 +1,6 @@
--- configure.seed.orig 2017-06-01 07:18:57 UTC
--- configure.seed.orig 2018-01-12 09:48:20 UTC
+++ configure.seed
@@ -19,26 +19,8 @@ SYSTEM=`uname -s`
@@ -29,26 +29,8 @@ fi
# On CentOS 6 `git rev-list HEAD --count` does not work
#
#
@ -28,7 +28,7 @@
if [ test -f /usr/bin/lsb_release ]; then
CODENAME=`/usr/bin/lsb_release -c|cut -f 2`
if [[ $CODENAME == "wheezy" ]]; then :
@@ -54,26 +36,7 @@ GIT_BRANCH="@GIT_BRANCH@"
@@ -64,26 +46,7 @@ GIT_BRANCH="@GIT_BRANCH@"
PRO_GIT_RELEASE="@PRO_GIT_RELEASE@"
PRO_GIT_DATE="@PRO_GIT_DATE@"
@ -56,7 +56,7 @@
if test -d "/usr/include/openssl"; then :
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
@@ -378,18 +341,6 @@ GMAKE=`which gmake`
@@ -438,18 +401,6 @@ GMAKE=`which gmake`
if test x$GMAKE = x
then
GMAKE="make"

View file

@ -0,0 +1,11 @@
--- src/DivertInterface.cpp.orig 2018-01-18 14:31:32 UTC
+++ src/DivertInterface.cpp
@@ -101,7 +101,7 @@ DivertInterface::DivertInterface(const char *name) : N
sin.sin_family = AF_INET, sin.sin_port = htons(port);
sin_len = sizeof(struct sockaddr_in);
- if(bind(sock, (struct sockaddr *) &sin, sin_len) == -1) {
+ if(::bind(sock, (struct sockaddr *) &sin, sin_len) == -1) {
ntop->getTrace()->traceEvent(TRACE_ERROR, "Unable to bind divert socket to port %d", port);
throw 1;
}

View file

@ -0,0 +1,11 @@
--- src/Utils.cpp.orig 2018-01-12 09:48:20 UTC
+++ src/Utils.cpp
@@ -2370,7 +2370,7 @@ int Utils::bindSockToDevice(int sock, int family, cons
if(pAdapterFound != NULL) {
int addrsize = (family == AF_INET6) ? sizeof(sockaddr_in6) : sizeof(sockaddr_in);
- bindresult = bind(sock, pAdapterFound->ifa_addr, addrsize);
+ bindresult = ::bind(sock, pAdapterFound->ifa_addr, addrsize);
}
freeifaddrs(pList);

View file

@ -0,0 +1,29 @@
--- third-party/mongoose/mongoose.c.orig 2018-01-12 09:48:20 UTC
+++ third-party/mongoose/mongoose.c
@@ -730,7 +730,7 @@ struct mg_request_info *mg_get_request_info(struct mg_
return &conn->request_info;
}
-static void mg_strlcpy(register char *dst, register const char *src, size_t n) {
+static void mg_strlcpy(char *dst, const char *src, size_t n) {
for (; *src != '\0' && n > 1; n--) {
*dst++ = *src++;
}
@@ -2139,7 +2139,7 @@ static void MD5Init(MD5_CTX *ctx) {
}
static void MD5Transform(uint32_t buf[4], uint32_t const in[16]) {
- register uint32_t a, b, c, d;
+ uint32_t a, b, c, d;
a = buf[0];
b = buf[1];
@@ -4511,7 +4511,7 @@ static int set_ports_option(struct mg_context *ctx) {
(void *)
#endif
&on, sizeof(on))) != 0 ||
- (rc_bind = bind(so.sock,
+ (rc_bind = ::bind(so.sock,
&sa->sa,
(sa->sa.sa_family == AF_INET) ? sizeof(sa->sin) : sizeof(sa->sin6))
) != 0 ||

View file

@ -0,0 +1,11 @@
--- third-party/snmp/net.c.orig 2018-01-12 09:48:20 UTC
+++ third-party/snmp/net.c
@@ -64,7 +64,7 @@ int open_udp_socket(int port)
si_me.sin_family = AF_INET;
si_me.sin_port = htons(port);
si_me.sin_addr.s_addr = htonl(INADDR_ANY);
- if (bind(s, (struct sockaddr *) &si_me, sizeof(si_me)) != 0)
+ if (::bind(s, (struct sockaddr *) &si_me, sizeof(si_me)) != 0)
return(-1); //diep("bind");
return s;