diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-05-30 08:36:04 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-05-30 08:38:12 +0200 |
commit | c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6 (patch) | |
tree | d125a43e4be7657528af5137b516a7db8e48c96a /net-misc/aria2 | |
parent | dev-libs/libgit2: Bump to 0.27.1 (diff) | |
download | gentoo-c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6.tar.gz gentoo-c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6.tar.bz2 gentoo-c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6.zip |
net-misc/aria2: Backport make_unique fix
Closes: https://bugs.gentoo.org/655892
Diffstat (limited to 'net-misc/aria2')
-rw-r--r-- | net-misc/aria2/aria2-1.34.0.ebuild | 1 | ||||
-rw-r--r-- | net-misc/aria2/files/aria2-1.34.0-make_unique.patch | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/net-misc/aria2/aria2-1.34.0.ebuild b/net-misc/aria2/aria2-1.34.0.ebuild index 330ad0add544..aa58515c9fb6 100644 --- a/net-misc/aria2/aria2-1.34.0.ebuild +++ b/net-misc/aria2/aria2-1.34.0.ebuild @@ -63,6 +63,7 @@ pkg_setup() { } src_prepare() { + eapply "${FILESDIR}"/${P}-make_unique.patch default sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed" } diff --git a/net-misc/aria2/files/aria2-1.34.0-make_unique.patch b/net-misc/aria2/files/aria2-1.34.0-make_unique.patch new file mode 100644 index 000000000000..448d6cfe7753 --- /dev/null +++ b/net-misc/aria2/files/aria2-1.34.0-make_unique.patch @@ -0,0 +1,44 @@ +From e8e04d6f22a507e8374651d3d2343cd9fb986993 Mon Sep 17 00:00:00 2001 +From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> +Date: Thu, 17 May 2018 18:39:44 +0900 +Subject: [PATCH] Fix build failure when InternalDHKeyExchange is used + +--- + src/bignum.h | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/bignum.h b/src/bignum.h +index e59ab6bbf..5fb4402bc 100644 +--- a/src/bignum.h ++++ b/src/bignum.h +@@ -19,6 +19,8 @@ + #include <memory> + #include <stdint.h> + ++#include "a2functional.h" ++ + namespace bignum { + + template <size_t dim> class ulong { +@@ -31,17 +33,17 @@ template <size_t dim> class ulong { + std::unique_ptr<char_t[]> buf_; + + public: +- inline ulong() : buf_(make_unique<char_t[]>(dim)) {} +- inline ulong(size_t t) : buf_(make_unique<char_t[]>(dim)) ++ inline ulong() : buf_(aria2::make_unique<char_t[]>(dim)) {} ++ inline ulong(size_t t) : buf_(aria2::make_unique<char_t[]>(dim)) + { + memcpy(buf_.get(), (char_t*)&t, sizeof(t)); + } +- inline ulong(const ulong<dim>& rhs) : buf_(make_unique<char_t[]>(dim)) ++ inline ulong(const ulong<dim>& rhs) : buf_(aria2::make_unique<char_t[]>(dim)) + { + memcpy(buf_.get(), rhs.buf_.get(), dim); + } + explicit inline ulong(const char_t* data, size_t size) +- : buf_(make_unique<char_t[]>(dim)) ++ : buf_(aria2::make_unique<char_t[]>(dim)) + { + if (size > dim) { + throw std::bad_alloc(); |