summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/srvrec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/srvrec.cc')
-rw-r--r--apt-pkg/contrib/srvrec.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc
index 9af282653..be159bad9 100644
--- a/apt-pkg/contrib/srvrec.cc
+++ b/apt-pkg/contrib/srvrec.cc
@@ -16,6 +16,7 @@
#include <time.h>
#include <algorithm>
+#include <tuple>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
@@ -25,6 +26,12 @@
#include "srvrec.h"
+bool SrvRec::operator==(SrvRec const &other) const
+{
+ return (std::tie(target, priority, weight, port) ==
+ std::tie(other.target, other.priority, other.weight, other.port));
+}
+
bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result)
{
std::string target;