Build fix, use -Os on Linux too.

This commit is contained in:
Adam Ierymenko 2017-06-07 17:19:33 -07:00
commit 9a3c34b5b3
3 changed files with 40 additions and 56 deletions

View file

@ -57,6 +57,7 @@
#include <algorithm>
#include <utility>
#include <map>
#include <set>
#include "../node/NonCopyable.hpp"
#include "../node/InetAddress.hpp"
@ -471,6 +472,20 @@ Binder_send_packet:
return aa;
}
/**
* @param addr Address to check
* @return True if this is a bound local interface address
*/
inline bool isBoundLocalInterfaceAddress(const InetAddress &addr) const
{
Mutex::Lock _l(_lock);
for(std::vector<_Binding>::const_iterator b(_bindings.begin());b!=_bindings.end();++b) {
if (b->address == addr)
return true;
}
return false;
}
private:
std::vector<_Binding> _bindings;
Mutex _lock;