From: Ivan Maidanski Date: Sat, 19 Nov 2016 17:02:25 +0000 (+0300) Subject: Fix initsecondarythread_test runtime failure if GC compiled w/o threads X-Git-Tag: v8.0.0~1022 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f87cce2ef8c1a732ecec7c6e0550cba80174fe77;p=gc Fix initsecondarythread_test runtime failure if GC compiled w/o threads Now the test should fail during its linking if a single-threaded libgc is used (this should not happen in case of configure/make). * tests/initsecondarythread.c (main): Call GC_get_parallel() to ensure that libgc is compiled with the threads support. --- diff --git a/tests/initsecondarythread.c b/tests/initsecondarythread.c index 5f214050..73cc298d 100644 --- a/tests/initsecondarythread.c +++ b/tests/initsecondarythread.c @@ -74,6 +74,7 @@ int main(void) /* GC_INIT() must be called from main thread only. */ GC_INIT(); # endif + (void)GC_get_parallel(); /* linking fails if no threads support */ # ifdef GC_PTHREADS if ((code = pthread_create (&t, NULL, thread, NULL)) != 0) { fprintf(stderr, "Thread creation failed %d\n", code);