diff --git a/thread_pthread_mn.c b/thread_pthread_mn.c index d0282abfcb..137b0b2efa 100644 --- a/thread_pthread_mn.c +++ b/thread_pthread_mn.c @@ -185,7 +185,7 @@ static struct nt_stack_chunk_header * nt_alloc_thread_stack_chunk(void) { int mmap_flags = MAP_ANONYMOUS | MAP_PRIVATE; -#ifdef MAP_STACK // not available on macOS +#if defined(MAP_STACK) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) mmap_flags |= MAP_STACK; #endif