-
Notifications
You must be signed in to change notification settings - Fork 502
Fix cent7 build #5666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
EvgeniyPatlan
wants to merge
2
commits into
CUSTOM-220
Choose a base branch
from
CUSTOM-220_cent7
base: CUSTOM-220
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix cent7 build #5666
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,10 +34,17 @@ | |
| #include <cstdint> // std::uint32_t | ||
| #include <limits> // std::numeric_limits | ||
| #include <type_traits> // std::is_convertible | ||
| #include <cstring> // memcpy | ||
|
|
||
| #include <zlib.h> // crc32_z | ||
| #include <zlib.h> // crc32 or crc32_z | ||
|
|
||
| #include "my_compiler.h" // My_ATTRIBUTE | ||
| #if ZLIB_VERNUM >= 0x1290 | ||
| #define MY_CRC32(crc, buf, len) crc32_z(crc, buf, len) | ||
| #else | ||
| #define MY_CRC32(crc, buf, len) crc32(crc, buf, len) | ||
| #endif | ||
|
Comment on lines
+41
to
+45
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks fine. |
||
|
|
||
| #include "my_compiler.h" // MY_ATTRIBUTE | ||
| #include "my_config.h" | ||
|
|
||
| #ifdef HAVE_ARMV8_CRC32_INTRINSIC | ||
|
|
@@ -77,7 +84,7 @@ inline std::uint32_t IntegerCrc32(std::uint32_t crc, I i) { | |
| unsigned char buf[sizeof(I)]; | ||
| memcpy(buf, &i, sizeof(I)); | ||
| crc = ~crc; | ||
| crc = crc32_z(crc, buf, sizeof(I)); | ||
| crc = MY_CRC32(crc, buf, sizeof(I)); | ||
| return ~crc; | ||
| } | ||
|
|
||
|
|
@@ -122,7 +129,7 @@ inline ha_checksum my_checksum(ha_checksum crc, const unsigned char *pos, | |
| #endif // HAVE_ARMV8_CRC32_INTRINSIC | ||
| static_assert(std::is_convertible<uLong, ha_checksum>::value, | ||
| "uLong cannot be converted to ha_checksum"); | ||
| assert(crc32_z(crc, pos, length) <= std::numeric_limits<ha_checksum>::max()); | ||
| return crc32_z(crc, pos, length); | ||
| assert(MY_CRC32(crc, pos, length) <= std::numeric_limits<ha_checksum>::max()); | ||
| return MY_CRC32(crc, pos, length); | ||
| } | ||
| #endif /* not defined(MY_CEHCKSUM_INCLUDED) */ | ||
| #endif /* MY_CHECKSUM_INCLUDED */ | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hard to verify as implementation is different in various OpenSSL versions but probably a client doesn't use
Enterprise Encryption UDFs for OpenSSLat all so we should be safe.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra/opensslppis Percona's Enterprise Encryption UDFs for OpenSSLThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried to adopt it to solve compilation issue with openssl1.0.2k and as this build should be used just for tests I hope it should be fine :)