From: Tomek Mrugalski Date: Tue, 14 Jul 2020 13:36:47 +0000 (+0200) Subject: [#1174] Fixed compilation failures for dhcp4/dhcp6 X-Git-Tag: Kea-1.7.10~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e3ba22dda7eccc2bc5a0059d787492e53c15652;p=thirdparty%2Fkea.git [#1174] Fixed compilation failures for dhcp4/dhcp6 --- diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc index e754293e13..79d2a03ea4 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc @@ -676,7 +676,7 @@ ControlledDhcpv4Srv::commandStatisticSetMaxSampleAgeAllHandler(const string&, ConstElementPtr answer = stats_mgr.statisticSetMaxSampleAgeAllHandler(args); // Update the default parameter. auto duration = stats_mgr.getMaxSampleAgeDefault(); - long max_age = duration.total_seconds(); + long max_age = duration.count(); // do we need to check if this is in seconds? CfgMgr::instance().getCurrentCfg()->addConfiguredGlobal( "statistic-default-sample-age", Element::create(max_age)); return (answer); diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index 8153f34b09..a3ea616588 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "marker_file.h" diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index 50c39e9b68..64b0b81abb 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -679,7 +679,7 @@ ControlledDhcpv6Srv::commandStatisticSetMaxSampleAgeAllHandler(const string&, ConstElementPtr answer = stats_mgr.statisticSetMaxSampleAgeAllHandler(args); // Update the default parameter. auto duration = stats_mgr.getMaxSampleAgeDefault(); - long max_age = duration.total_seconds(); + long max_age = duration.count(); /// @todo: do we need to check if this is in seconds? CfgMgr::instance().getCurrentCfg()->addConfiguredGlobal( "statistic-default-sample-age", Element::create(max_age)); return (answer); diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index 47e2cad81c..b171d58984 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "test_data_files_config.h" #include "test_libraries.h"