Fix build with mallocng.

This commit is contained in:
John Preston 2021-05-17 13:12:22 +04:00
parent 8e02c50f7d
commit fbe4e3f0ec
4 changed files with 16 additions and 12 deletions

View file

@ -538,7 +538,7 @@ QString countAlphaVersionSignature(quint64 version) { // duplicated in autoupdat
uint32 siglen = 0; uint32 siglen = 0;
RSA *prKey = [] { RSA *prKey = [&] {
const auto bio = makeBIO( const auto bio = makeBIO(
const_cast<char*>(cAlphaPrivateKey.constData()), const_cast<char*>(cAlphaPrivateKey.constData()),
-1); -1);

View file

@ -746,15 +746,19 @@ int psFixPrevious() {
namespace Platform { namespace Platform {
void start() { void start() {
// avoid stripping custom allocator // Avoid stripping custom allocator methods.
malloc(0); const auto address = [](auto method) {
calloc(0, 0); return reinterpret_cast<uint64>(method);
realloc(nullptr, 0); };
free(nullptr); const auto value = address(malloc)
aligned_alloc(0, 0); + address(calloc)
malloc_usable_size(nullptr); + address(realloc)
memalign(0, 0); + address(free)
posix_memalign(nullptr, 0, 0); + address(aligned_alloc)
+ address(malloc_usable_size)
+ address(memalign)
+ address(posix_memalign);
DEBUG_LOG(("Malloc addresses %1.").arg(value ? "non-null" : "null"));
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName())); LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));

@ -1 +1 @@
Subproject commit 62424e7babdc4aa4bce9514064e47c6e4a2cf33e Subproject commit 7525645598649afeab5bfe7fda612c2ad744e7a3

2
cmake

@ -1 +1 @@
Subproject commit 294a18baf8896609aeb78b0d9b92a8011b0fa2e5 Subproject commit de65519132126db2c2166cdf5af5f12e61652419