From 452f4a3bb94b443b13a109ed6c2895c54497a8ec Mon Sep 17 00:00:00 2001
From: Ivan Maidanski <ivmai@mail.ru>
Date: Tue, 20 Jun 2017 21:22:53 +0300
Subject: [PATCH] Fix compilation error in get_main_stack_base (Emscripten)

Issue #163 (bdwgc).

* os_dep.c [!BEOS && !AMIGA && !OS2 && !MSWIN32 && !MSWINCE && !CYGWIN32
&& !GC_OPENBSD_THREADS && !STACKBOTTOM && !HEURISTIC1 && !HEURISTIC2
&& !LINUX_STACKBOTTOM && !FREEBSD_STACKBOTTOM] (GC_get_main_stack_base):
Set result to null if STACK_NOT_SCANNED (instead of #error).
---
 os_dep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os_dep.c b/os_dep.c
index 0f22b80e..d941afcd 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -1252,7 +1252,7 @@ GC_INNER size_t GC_page_size = 0;
 #           endif
 #         endif
         }
-#     elif defined(CPPCHECK)
+#     elif defined(STACK_NOT_SCANNED) || defined(CPPCHECK)
         result = NULL;
 #     else
 #       error None of HEURISTIC* and *STACKBOTTOM defined!
-- 
2.40.0