net-p2p/mldonkey: Patch for C++17 support. #21663
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the
byte
type clash between Crypto++ global definition and C++17 one in #790134 by moving their definition to theCryptoPP
namespace.Since their definition is just an alias for
unsigned char
, @SoapGentoo recommended in #gentoo-dev-help replacing their use ofbyte
withunsigned char
. However, that would require a patch modifying ~500 lines of code while this other solution modifies less than 10 lines.Also, more importantly, moving Crypto++ definition of
byte
toCryptoPP
namespace was also the solution adopted upstream: weidai11/cryptopp@00f9818So I decided to follow upstream and this patch just adapts upstream Crypto++'s patch to MLDonkey's bundled version of Crypto++.
Crypto++ also has a wiki page where they discussed this same issue: https://www.cryptopp.com/wiki/Std::byte
I also submitted this same patch to MLDonkey: ygrek/mldonkey#66
But since it seems it's taking the maintainer some time to review it, I'm just already adding it to Portage to fix the compilation error with sys-devel/gcc:11 ASAP.
I've been using net-p2p/mldonkey with this patch for a week with no apparent issues.