Date: Mon, 13 Apr 2020 22:58:17 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r531641 - in head/net/ntopng: . files Message-ID: <202004132258.03DMwHdi035183@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Mon Apr 13 22:58:17 2020 New Revision: 531641 URL: https://svnweb.freebsd.org/changeset/ports/531641 Log: Add patch replacing lua_tonumber() with lua_tointeger() inside htons() calls. Tese were causing build to fail on armv7, and it's more correct anyway. Submitted by: garga (via email) MFH: 2020Q2 Added: head/net/ntopng/files/patch-src_ParsedFlow.cpp (contents, props changed) Modified: head/net/ntopng/Makefile Modified: head/net/ntopng/Makefile ============================================================================== --- head/net/ntopng/Makefile Mon Apr 13 22:57:36 2020 (r531640) +++ head/net/ntopng/Makefile Mon Apr 13 22:58:17 2020 (r531641) @@ -3,6 +3,7 @@ PORTNAME= ntopng PORTVERSION= 4.0.d20200326 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net Added: head/net/ntopng/files/patch-src_ParsedFlow.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/ntopng/files/patch-src_ParsedFlow.cpp Mon Apr 13 22:58:17 2020 (r531641) @@ -0,0 +1,25 @@ +--- src/ParsedFlow.cpp.orig 2020-03-26 13:52:23 UTC ++++ src/ParsedFlow.cpp +@@ -127,17 +127,17 @@ void ParsedFlow::fromLua(lua_State *L, int index) { + if(!strcmp(key, "vlan_id")) + vlan_id = lua_tonumber(L, -1); + else if(!strcmp(key, "version")) +- version = htons(lua_tonumber(L, -1)); ++ version = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "src_port")) +- src_port = htons(lua_tonumber(L, -1)); ++ src_port = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "dst_port")) +- dst_port = htons(lua_tonumber(L, -1)); ++ dst_port = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "l4_proto")) + l4_proto = lua_tonumber(L, -1); + else if(!strcmp(key, "tcp_flags")) +- tcp.tcp_flags = htons(lua_tonumber(L, -1)); ++ tcp.tcp_flags = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "direction")) +- direction = htons(lua_tonumber(L, -1)); ++ direction = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "first_switched")) + first_switched = lua_tonumber(L, -1); + else if(!strcmp(key, "last_switched"))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004132258.03DMwHdi035183>