diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-06-02 20:16:12 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-06-02 20:16:12 +0200 |
commit | 535e735102fd6638296a56f5bb620a7ca5db3fd5 (patch) | |
tree | e98a7b9610918fa370b5393d4cec2f0248d24227 | |
parent | 952fc0e0627cdf0b1eb90b7cb4d62ab0d1a06be8 (diff) | |
download | sciteco-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.c | 6 |
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) |