From: Thomas Markwalder Date: Thu, 14 Jul 2016 20:35:12 +0000 (-0400) Subject: [4277] Fixed tagged_statements name collision X-Git-Tag: trac4551_base~12^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cac472f52ae21c234c9e3c7f1485ca56166f8a79;p=thirdparty%2Fkea.git [4277] Fixed tagged_statements name collision Wrapped declaration of tagged_statements[] in pgsql_host_data_source.cc and mysql_host_data_source.cc in anonymous namespace. They collide otherwise. --- diff --git a/src/lib/dhcpsrv/mysql_host_data_source.cc b/src/lib/dhcpsrv/mysql_host_data_source.cc index 7e2b3e423d..13748dcf2c 100644 --- a/src/lib/dhcpsrv/mysql_host_data_source.cc +++ b/src/lib/dhcpsrv/mysql_host_data_source.cc @@ -1779,6 +1779,7 @@ public: }; +namespace { /// @brief Prepared MySQL statements used by the backend to insert and /// retrieve hosts from the database. TaggedStatement tagged_statements[] = { @@ -1934,6 +1935,8 @@ TaggedStatement tagged_statements[] = { {MySqlHostDataSourceImpl::NUM_STATEMENTS, NULL} }; +}; // end anonymouse namespace + MySqlHostDataSourceImpl:: MySqlHostDataSourceImpl(const MySqlConnection::ParameterMap& parameters) : host_exchange_(new MySqlHostWithOptionsExchange(MySqlHostWithOptionsExchange::DHCP4_ONLY)), diff --git a/src/lib/dhcpsrv/pgsql_host_data_source.cc b/src/lib/dhcpsrv/pgsql_host_data_source.cc index ee0d9c3ed7..080de03bf3 100644 --- a/src/lib/dhcpsrv/pgsql_host_data_source.cc +++ b/src/lib/dhcpsrv/pgsql_host_data_source.cc @@ -1260,8 +1260,10 @@ public: }; -/// @brief Prepared MySQL statements used by the backend to insert and -/// retrieve hosts from the database. +namespace { + +/// @brief Prepared PosgreSQL statements used by the backend to insert and +/// retrieve reservation data from the database. PgSqlTaggedStatement tagged_statements[] = { // PgSqlHostDataSourceImpl::INSERT_HOST // Inserts a host into the 'hosts' table. Returns the inserted host id. @@ -1447,6 +1449,8 @@ PgSqlTaggedStatement tagged_statements[] = { {0, { 0 }, NULL, NULL} }; +}; // end anonymous namespace + PgSqlHostDataSourceImpl:: PgSqlHostDataSourceImpl(const PgSqlConnection::ParameterMap& parameters) : host_exchange_(new PgSqlHostWithOptionsExchange(PgSqlHostWithOptionsExchange::DHCP4_ONLY)),