From 4927f251481df57a209284bb2ad2b237468e7792 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 20 Dec 2023 15:48:49 +0900 Subject: [PATCH] skip `MAP_STACK` on FreeBSD --- thread_pthread_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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