From: Mike Stepanek (mstepane) Date: Thu, 2 Jun 2022 20:30:08 +0000 (+0000) Subject: Pull request #3451: netflow: fix build on MacOS X-Git-Tag: 3.1.32.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c345c750ebd16f0d1ffb87b9d9b2d1b8eba7daed;p=thirdparty%2Fsnort3.git Pull request #3451: netflow: fix build on MacOS Merge in SNORT/snort3 from ~OSERHIIE/snort3:macos_build_fix to master Squashed commit of the following: commit 4ced378fa0217bd475d7e3fbdb96d7cfa9f8c4c3 Author: Oleksandr Serhiienko Date: Wed Jun 1 13:51:33 2022 +0300 netflow: fix build on MacOS This commit adds explicit type casting for ConfigLogger::log_value() function call which accepts number of size_t type as an argument. The reason is that on MacOS with Homebrew GCC 7.5.0 it cannot resolve the call with size_t type to one of the overloads with int parameters. --- diff --git a/src/service_inspectors/netflow/netflow.cc b/src/service_inspectors/netflow/netflow.cc index 7ab33dd41..28d9986d7 100644 --- a/src/service_inspectors/netflow/netflow.cc +++ b/src/service_inspectors/netflow/netflow.cc @@ -752,8 +752,8 @@ static void show_device(const NetflowRule& d, bool is_exclude) void NetflowInspector::show(const SnortConfig*) const { - ConfigLogger::log_value("flow_memcap", config->flow_memcap); - ConfigLogger::log_value("template_memcap", config->template_memcap); + ConfigLogger::log_value("flow_memcap", (uint64_t)config->flow_memcap); + ConfigLogger::log_value("template_memcap", (uint64_t)config->template_memcap); ConfigLogger::log_value("dump_file", config->dump_file); ConfigLogger::log_value("update_timeout", config->update_timeout); bool log_header = true;