Skip to content

Commit

Permalink
Fixed test using function only available on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
drowaudio committed May 24, 2024
1 parent cbe2833 commit e0d0635
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib_rt_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ INTERCEPTOR(void*, realloc, void *ptr, size_t new_size)
return REAL(realloc)(ptr, new_size);
}

#if __APPLE__
#ifdef __APPLE__
INTERCEPTOR(void *, reallocf, void *ptr, size_t size)
{
log_function_if_realtime_context (__func__);
Expand Down
4 changes: 4 additions & 0 deletions tests/fail_reallocf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

int main()
{
#if __APPLE_
auto res = malloc (1024);

realtime_context rc;
res = reallocf (res, 1024 * 4);

return 0;
#else
return 1;
#endif
}

0 comments on commit e0d0635

Please sign in to comment.