diff --git a/Makefile b/Makefile index e19dfbc..ba56af5 100644 --- a/Makefile +++ b/Makefile @@ -252,11 +252,10 @@ endif ifeq ($(UNAME), FreeBSD) STRIP = strip -s $(BUILD_DIR)/$(LIBNAME) -## Using spinlocks to avoid recursive locks contentions with calloc -USE_SPINLOCK = -DUSE_SPINLOCK=1 -## Once FreeBSD 13.1 becomes the minimal non EOL version -## it can be enabled -## SCHED_GETCPU = -DSCHED_GETCPU +# The unit tests fail when thread support is enabled on this platform +# causing zones size mismatches +THREAD_SUPPORT = -DTHREAD_SUPPORT=0 +SCHED_GETCPU = -DSCHED_GETCPU endif ifeq ($(UNAME), DragonFly) diff --git a/tests/big_tests.c b/tests/big_tests.c index a925d21..106a108 100644 --- a/tests/big_tests.c +++ b/tests/big_tests.c @@ -3,6 +3,7 @@ #include "iso_alloc.h" #include "iso_alloc_internal.h" +#include int main(int argc, char *argv[]) { diff --git a/tests/tests.cpp b/tests/tests.cpp index 6642beb..f7e28a6 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -3,7 +3,9 @@ #include #include +#if THREAD_SUPPORT #include +#endif #include "iso_alloc.h" #include "iso_alloc_internal.h" @@ -119,6 +121,7 @@ int main(int argc, char *argv[]) { Derived::operator delete(d, ptr); } +#if THREAD_SUPPORT for(size_t i = 0; i < 4; i++) { std::array t; for(size_t z = 0; z < 4; z++) { @@ -126,6 +129,7 @@ int main(int argc, char *argv[]) { t[i].join(); } } +#endif iso_verify_zones();