diff options
Diffstat (limited to 'src/alloc-override.c')
-rw-r--r-- | src/alloc-override.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/alloc-override.c b/src/alloc-override.c index 068b1fb..954f61e 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -50,6 +50,9 @@ terms of the MIT license. A copy of the license can be found in the file MI_INTERPOSE_MI(malloc), MI_INTERPOSE_MI(calloc), MI_INTERPOSE_MI(realloc), + MI_INTERPOSE_MI(strdup), + MI_INTERPOSE_MI(strndup), + MI_INTERPOSE_MI(realpath), MI_INTERPOSE_MI(free) }; #else @@ -131,6 +134,12 @@ size_t malloc_size(void* p) MI_FORWARD1(mi_usable_size,p) size_t malloc_usable_size(void *p) MI_FORWARD1(mi_usable_size,p) void cfree(void* p) MI_FORWARD0(mi_free, p) +#ifdef __APPLE__ +char* strdup(const char* s) MI_FORWARD1(mi_strdup,s) +char* strndup(const char* s, size_t n) MI_FORWARD2(mi_strndup,s,n) +char* realpath(const char* fname, char* resolved_name) MI_FORWARD2(mi_realpath,fname,resolved_name) +#endif + int posix_memalign(void** p, size_t alignment, size_t size) { // TODO: the spec says we should return EINVAL also if alignment is not a power of 2. // The spec also dictates we should not modify `*p` on an error. (issue#27) |