summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf/buf0buf.cc
diff options
context:
space:
mode:
authorwlad <wlad@localhost.localdomain>2017-11-21 21:14:06 +0100
committerwlad <wlad@localhost.localdomain>2017-11-21 21:14:06 +0100
commitb6d72ed44dc76d5f642d67bed68fa8a2fc559b57 (patch)
tree5ac9ea7a568616ebd34c7d28b5858b3477fec36f /storage/xtradb/buf/buf0buf.cc
parent7c4f859384b2a9a79a57dda3e8c509e5a932a066 (diff)
downloadmariadb-git-b6d72ed44dc76d5f642d67bed68fa8a2fc559b57.tar.gz
MDEV-14283 : Fix Solaris 10 build.
- introduce system check for posix_memalign (not available on Solaris 10) - Disable dtrace probes, to fix weird link errors in mariabackup
Diffstat (limited to 'storage/xtradb/buf/buf0buf.cc')
-rw-r--r--storage/xtradb/buf/buf0buf.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 2ee2b2ba37f..80ff1c14a64 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -102,10 +102,13 @@ inline void* aligned_malloc(size_t size, size_t align) {
void *result;
#ifdef _MSC_VER
result = _aligned_malloc(size, align);
-#else
+#elif defined (HAVE_POSIX_MEMALIGN)
if(posix_memalign(&result, align, size)) {
result = 0;
}
+#else
+ /* Use unaligned malloc as fallback */
+ result = malloc(size);
#endif
return result;
}