diff options
Diffstat (limited to 'tests/malloc_test.cpp')
-rw-r--r-- | tests/malloc_test.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp index 30da5c32f..f15fc75d5 100644 --- a/tests/malloc_test.cpp +++ b/tests/malloc_test.cpp @@ -55,10 +55,14 @@ #define HAVE_REALLOCARRAY 1 -#else +#elif defined(__GLIBC__) #define HAVE_REALLOCARRAY __GLIBC_PREREQ(2, 26) +#elif defined(MUSL) + +#define HAVE_REALLOCARRAY 1 + #endif TEST(malloc, malloc_std) { @@ -655,10 +659,14 @@ TEST(malloc, verify_alignment) { } TEST(malloc, mallopt_smoke) { +#if !defined(MUSL) errno = 0; ASSERT_EQ(0, mallopt(-1000, 1)); // mallopt doesn't set errno. ASSERT_EQ(0, errno); +#else + GTEST_SKIP() << "musl doesn't have mallopt"; +#endif } TEST(malloc, mallopt_decay) { |