[Click] Build fix for etherswitch.cc [PATCH ATTACHED]
Michael Gellman
m.gellman at imperial.ac.uk
Mon Apr 3 05:43:07 EDT 2006
On compiling the latest CVS version of Click on Fedora Core 2, I
received the following error:
In file included from ../include/click/straccum.hh:210,
from ../include/click/straccum.hh:248,
from ../elements/etherswitch/etherswitch.cc:210:
../include/click/bighashmap.hh: In instantiation of `HashMap<EtherAddress,
EtherSwitch::AddrInfo>::Elt':
../include/click/bighashmap.hh:112: instantiated from `const K&
_HashMap_const_iterator<K, V>::key() const [with K = EtherAddress, V =
EtherSwitch::AddrInfo]'
../include/click/straccum.hh:207: instantiated from here
../include/click/bighashmap.hh:82: error: base `HashMap<EtherAddress,
EtherSwitch::AddrInfo>::Pair' with only non-default constructor in class
without a constructor
I believe the attached patch, which adds a default constructor to the
AddrInfo struct, corrects the error.
Michael Gellman
--
Intelligent Systems & Networks Group
Dept of Electrical & Electronic Engineering
Imperial College London
London SW7 2BT
--- click-1.5cvs/elements/etherswitch/etherswitch.hh 2006-03-06
11:28:42.825077168 +0000
+++ click-working/elements/etherswitch/etherswitch.hh 2006-03-06
12:39:56.977307264 +0000
@@ -78,6 +78,7 @@
int port;
Timestamp stamp;
inline AddrInfo(int p, const Timestamp &t);
+ inline AddrInfo();
};
private:
@@ -95,6 +96,12 @@
};
inline
+EtherSwitch::AddrInfo::AddrInfo()
+ : port(0), stamp(Timestamp(0))
+{
+}
+
+inline
EtherSwitch::AddrInfo::AddrInfo(int p, const Timestamp& s)
: port(p), stamp(s)
{
More information about the click
mailing list