diff options
author | daan <daan@microsoft.com> | 2019-07-02 12:49:28 -0700 |
---|---|---|
committer | daan <daan@microsoft.com> | 2019-07-02 12:49:28 -0700 |
commit | aeff1db32b8dd552a9f643b71241519acafc125c (patch) | |
tree | 3a53949cd79dc86f642abfd0e2bb839a30341a5c /src/alloc-override.c | |
parent | d35fc6cdc44d209fcb12d5311a91f76604d5a8b5 (diff) |
Fixing interpose on macOS
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) |