mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
kea: pull in upstream fix for build with libc++ 19.1.7
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
COMMENT= high-performance and extensible DHCP server engine from ISC
|
||||
|
||||
VERSION= 2.4.2
|
||||
REVISION= 1
|
||||
REVISION= 2
|
||||
PORTROACH= limitw:1,even
|
||||
|
||||
# 2.6 update notes so far;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
Fix build with libc++ 19.1.7
|
||||
https://github.com/isc-projects/kea/commit/d4878ebec89ed1f869940e67cff8f8fe657b2ee4
|
||||
|
||||
/usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char
|
||||
_traits<unsigned char>'
|
||||
|
||||
Index: src/lib/dns/name.cc
|
||||
--- src/lib/dns/name.cc.orig
|
||||
+++ src/lib/dns/name.cc
|
||||
@@ -305,7 +305,7 @@ Name::Name(const std::string &namestring, bool downcas
|
||||
// And get the output
|
||||
labelcount_ = offsets.size();
|
||||
isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
|
||||
- ndata_.assign(ndata.data(), ndata.size());
|
||||
+ ndata_.assign(ndata.data(), ndata.data() + ndata.size());
|
||||
length_ = ndata_.size();
|
||||
offsets_.assign(offsets.begin(), offsets.end());
|
||||
}
|
||||
@@ -339,7 +339,7 @@ Name::Name(const char* namedata, size_t data_len, cons
|
||||
// Get the output
|
||||
labelcount_ = offsets.size();
|
||||
isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
|
||||
- ndata_.assign(ndata.data(), ndata.size());
|
||||
+ ndata_.assign(ndata.data(), ndata.data() + ndata.size());
|
||||
length_ = ndata_.size();
|
||||
offsets_.assign(offsets.begin(), offsets.end());
|
||||
|
||||
@@ -350,7 +350,7 @@ Name::Name(const char* namedata, size_t data_len, cons
|
||||
// Drop the last character of the data (the \0) and append a copy of
|
||||
// the origin's data
|
||||
ndata_.erase(ndata_.end() - 1);
|
||||
- ndata_.append(origin->ndata_);
|
||||
+ ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end());
|
||||
|
||||
// Do a similar thing with offsets. However, we need to move them
|
||||
// so they point after the prefix we parsed before.
|
||||
@@ -586,7 +586,7 @@ Name::concatenate(const Name& suffix) const {
|
||||
|
||||
Name retname;
|
||||
retname.ndata_.reserve(length);
|
||||
- retname.ndata_.assign(ndata_, 0, length_ - 1);
|
||||
+ retname.ndata_.assign(ndata_.data(), ndata_.data() + length_ - 1);
|
||||
retname.ndata_.insert(retname.ndata_.end(),
|
||||
suffix.ndata_.begin(), suffix.ndata_.end());
|
||||
isc_throw_assert(retname.ndata_.size() == length);
|
||||
@@ -626,7 +626,7 @@ Name::reverse() const {
|
||||
NameString::const_iterator n0 = ndata_.begin();
|
||||
retname.offsets_.push_back(0);
|
||||
while (rit1 != offsets_.rend()) {
|
||||
- retname.ndata_.append(n0 + *rit1, n0 + *rit0);
|
||||
+ retname.ndata_.insert(retname.ndata_.end(), n0 + *rit1, n0 + *rit0);
|
||||
retname.offsets_.push_back(retname.ndata_.size());
|
||||
++rit0;
|
||||
++rit1;
|
||||
@@ -666,7 +666,7 @@ Name::split(const unsigned int first, const unsigned i
|
||||
// original name, and append the trailing dot explicitly.
|
||||
//
|
||||
retname.ndata_.reserve(retname.offsets_.back() + 1);
|
||||
- retname.ndata_.assign(ndata_, offsets_[first], retname.offsets_.back());
|
||||
+ retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back());
|
||||
retname.ndata_.push_back(0);
|
||||
|
||||
retname.length_ = retname.ndata_.size();
|
||||
@@ -0,0 +1,18 @@
|
||||
Fix build with libc++ 19.1.7
|
||||
https://github.com/isc-projects/kea/commit/d4878ebec89ed1f869940e67cff8f8fe657b2ee4
|
||||
|
||||
/usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char
|
||||
_traits<unsigned char>'
|
||||
|
||||
Index: src/lib/dns/name.h
|
||||
--- src/lib/dns/name.h.orig
|
||||
+++ src/lib/dns/name.h
|
||||
@@ -232,7 +232,7 @@ class Name {
|
||||
//@{
|
||||
private:
|
||||
/// \brief Name data string
|
||||
- typedef std::basic_string<uint8_t> NameString;
|
||||
+ typedef std::vector<uint8_t> NameString;
|
||||
/// \brief Name offsets type
|
||||
typedef std::vector<uint8_t> NameOffsets;
|
||||
|
||||
Reference in New Issue
Block a user