summaryrefslogtreecommitdiffstats
path: root/tests/thread_deadlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread_deadlock.c')
-rw-r--r--tests/thread_deadlock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/thread_deadlock.c b/tests/thread_deadlock.c
index b72367f..6c58af3 100644
--- a/tests/thread_deadlock.c
+++ b/tests/thread_deadlock.c
@@ -43,7 +43,10 @@
#else
#define CONSTRUCTOR_ATTRIBUTE
#endif /* HAVE_CONSTRUCTOR_ATTRIBUTE */
-
+#if ! defined(HAVE_CONSTRUCTOR_ATTRIBUTE) && defined(HAVE_PRAGMA_INIT)
+/* xlC and other oldschool compilers support (only) this */
+#pragma init (thread_deadlock_constructor)
+#endif
void thread_deadlock_constructor(void) CONSTRUCTOR_ATTRIBUTE;
static void thread_deadlock_prepare(void)