aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-02 20:16:12 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-02 20:16:12 +0200
commit535e735102fd6638296a56f5bb620a7ca5db3fd5 (patch)
treee98a7b9610918fa370b5393d4cec2f0248d24227
parent952fc0e0627cdf0b1eb90b7cb4d62ab0d1a06be8 (diff)
downloadsciteco-535e735102fd6638296a56f5bb620a7ca5db3fd5.tar.gz
avoid aliased functions, as they are not supported on Darwin (macOS)
NOTE: Aliases and weak symbols must not be used for portability reasons!
-rw-r--r--src/memory.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/memory.c b/src/memory.c
index f8942fd..c80ccc7 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -342,7 +342,11 @@ memalign(size_t alignment, size_t size)
return ptr;
}
-void *aligned_alloc(size_t, size_t) __attribute__((used, alias("memalign")));
+void * __attribute__((used))
+aligned_alloc(size_t alignment, size_t size)
+{
+ return memalign(alignment, size);
+}
int __attribute__((used))
posix_memalign(void **memptr, size_t alignment, size_t size)