net-p2p/xbt: fix build on ARM / POWER
Tracker/tracker_input.cpp:6:49: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing] std::array<char, 16> res = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0 }; ^~
This commit is contained in:
parent
c6a8b4ea40
commit
735a7f11b1
1 changed files with 14 additions and 0 deletions
14
net-p2p/xbt/files/patch-Tracker_tracker__input.cpp
Normal file
14
net-p2p/xbt/files/patch-Tracker_tracker__input.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- Tracker/tracker_input.cpp.orig 2023-01-10 00:32:43 UTC
|
||||
+++ Tracker/tracker_input.cpp
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
#include "tracker_input.h"
|
||||
|
||||
-static std::array<char, 16> to_ipv6(uint32_t v)
|
||||
+static std::array<signed char, 16> to_ipv6(uint32_t v)
|
||||
{
|
||||
- std::array<char, 16> res = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0 };
|
||||
+ std::array<signed char, 16> res = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0 };
|
||||
memcpy(&res[12], &v, 4);
|
||||
return res;
|
||||
}
|
Loading…
Reference in a new issue