From 6bd4510185b6600fb5ab9722005e44e199b70a37 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 9 Oct 2017 22:17:15 +0300 Subject: [PATCH] Support GC_init (and get_stack_base) from non-main thread on NetBSD Now GC_get_[main_]stack_base uses pthread_getattr_np() and pthread_attr_getstack() to determine the stack base address on NetBSD. * include/private/gcconfig.h [NETBSD && !NO_PTHREAD_GETATTR_NP] (HAVE_PTHREAD_GETATTR_NP): Define. --- include/private/gcconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index df00dfa0..ecc8dbbd 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -3035,7 +3035,7 @@ /* Outline pthread primitives to use in GC_get_[main_]stack_base. */ #if ((defined(FREEBSD) && defined(__GLIBC__)) /* kFreeBSD */ \ - || defined(LINUX) || defined(PLATFORM_ANDROID)) \ + || defined(LINUX) || defined(NETBSD) || defined(PLATFORM_ANDROID)) \ && !defined(NO_PTHREAD_GETATTR_NP) # define HAVE_PTHREAD_GETATTR_NP 1 #elif defined(FREEBSD) && !defined(__GLIBC__) \ -- 2.40.0