diff options
author | Sam James <sam@gentoo.org> | 2021-08-12 00:02:37 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-08-12 00:03:11 +0100 |
commit | f08993a09f29a42b693fd385ed5777323c67441b (patch) | |
tree | 4654ccb6dee4cffcd742947a4488787a1ce9a1df /net-misc/xmrig | |
parent | profiles/arch/riscv: add bug number to dev-python/argcomplete[test] mask (diff) | |
download | gentoo-f08993a09f29a42b693fd385ed5777323c67441b.tar.gz gentoo-f08993a09f29a42b693fd385ed5777323c67441b.tar.bz2 gentoo-f08993a09f29a42b693fd385ed5777323c67441b.zip |
net-misc/xmrig: backport arm64 narrowing conversion patch
Needed for arches with unsigned char to fix compilation.
Bug: https://github.com/xmrig/xmrig/issues/2527
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/xmrig')
-rw-r--r-- | net-misc/xmrig/files/xmrig-6.14.0-narrowing-conversion-arm64.patch | 27 | ||||
-rw-r--r-- | net-misc/xmrig/xmrig-6.14.0.ebuild | 5 |
2 files changed, 31 insertions, 1 deletions
diff --git a/net-misc/xmrig/files/xmrig-6.14.0-narrowing-conversion-arm64.patch b/net-misc/xmrig/files/xmrig-6.14.0-narrowing-conversion-arm64.patch new file mode 100644 index 000000000000..7f1f1bb4da72 --- /dev/null +++ b/net-misc/xmrig/files/xmrig-6.14.0-narrowing-conversion-arm64.patch @@ -0,0 +1,27 @@ +Fixes build on arm64 (and other platforms with unsigned char). + +https://github.com/xmrig/xmrig/commit/f4cdc527b00571150e8521331928c75b44e071f9.patch +https://github.com/xmrig/xmrig/issues/2527 + +From f4cdc527b00571150e8521331928c75b44e071f9 Mon Sep 17 00:00:00 2001 +From: XMRig <support@xmrig.com> +Date: Tue, 10 Aug 2021 01:40:36 +0700 +Subject: [PATCH] #2527 Fix narrowing conversion. + +--- + src/base/net/stratum/DaemonClient.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/base/net/stratum/DaemonClient.cpp b/src/base/net/stratum/DaemonClient.cpp +index 77818f34c..76f30c653 100644 +--- a/src/base/net/stratum/DaemonClient.cpp ++++ b/src/base/net/stratum/DaemonClient.cpp +@@ -65,7 +65,7 @@ static const char *kJsonRPC = "/json_rpc"; + + static constexpr size_t kBlobReserveSize = 8; + +-static const char kZMQGreeting[64] = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 'N', 'U', 'L', 'L' }; ++static const char kZMQGreeting[64] = { static_cast<char>(-1), 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 'N', 'U', 'L', 'L' }; + static constexpr size_t kZMQGreetingSize1 = 11; + + static const char kZMQHandshake[] = "\4\x19\5READY\xbSocket-Type\0\0\0\3SUB"; diff --git a/net-misc/xmrig/xmrig-6.14.0.ebuild b/net-misc/xmrig/xmrig-6.14.0.ebuild index 97dc2905531c..454bae8f9729 100644 --- a/net-misc/xmrig/xmrig-6.14.0.ebuild +++ b/net-misc/xmrig/xmrig-6.14.0.ebuild @@ -30,7 +30,10 @@ RDEPEND=" !arm64? ( sys-apps/msr-tools ) " -PATCHES=( "${FILESDIR}"/${PN}-6.12.2-nonotls.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-6.12.2-nonotls.patch + "${FILESDIR}"/${PN}-6.14.0-narrowing-conversion-arm64.patch +) src_prepare() { if ! use donate ; then |