Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddd28630 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Second try at adding a compatibility symbol for the MemoryBase constructor.

Third-party libraries are currently trying to use the
MemoryBase constructor but failing because we fixed the
definition of ssize_t. This is a stop-gap for users of
this private API until we can get them fixed.

Bug: 8253769
Change-Id: Ie7c86f45fa39cb53539cab0ffe8585a585656714
parent d8151306
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


#define LOG_TAG "MemoryBase"


#include <stdlib.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdint.h>
@@ -44,3 +45,11 @@ MemoryBase::~MemoryBase()


// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
}; // namespace android
}; // namespace android

// Backwards compatibility for libdatabase_sqlcipher (http://b/8253769).
extern "C" void _ZN7android10MemoryBaseC1ERKNS_2spINS_11IMemoryHeapEEEij(void*, void*, ssize_t, size_t);
extern "C" void _ZN7android10MemoryBaseC1ERKNS_2spINS_11IMemoryHeapEEElj(void* obj, void* h, long o, unsigned int size) {
    _ZN7android10MemoryBaseC1ERKNS_2spINS_11IMemoryHeapEEEij(obj, h, o, size);
    ALOGW("Using temporary compatibility workaround for usage of MemoryBase "
          "private API. Please fix your application!");
}