summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2020-05-14 23:51:15 +0000
committerKarl Williamson <khw@cpan.org>2020-07-30 15:57:59 -0600
commit22ca1a825f4307983785c7182370d7c2fc43f085 (patch)
tree72f35eea2edfa0e5a4fdbd6d97fe5378f79716c2 /util.c
parentad748fbb4e280d7d6e7da9f28a818135580e9a62 (diff)
downloadperl-22ca1a825f4307983785c7182370d7c2fc43f085.tar.gz
Always expose the perl_tsa_mutex_* functions when threads are enabled
These functions were only part of the API if perl is built with clang. However perl modules built with clang still try to use them even when perl itself is built with gcc. This patch replaces the #ifdef PERL_TSA_ACTIVE around these functions with defined(USE_ITHREADS) && defined(I_PTHREAD) so they are always available when treading is enabled. This fixes the clang build of perl modules when perl is built with gcc.
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util.c b/util.c
index 0b546d5b21..d0c639a01e 100644
--- a/util.c
+++ b/util.c
@@ -6360,7 +6360,7 @@ Perl_dump_c_backtrace(pTHX_ PerlIO* fp, int depth, int skip)
#endif /* #ifdef USE_C_BACKTRACE */
-#ifdef PERL_TSA_ACTIVE
+#if defined(USE_ITHREADS) && defined(I_PTHREAD)
/* pthread_mutex_t and perl_mutex are typedef equivalent
* so casting the pointers is fine. */
@@ -6382,7 +6382,6 @@ int perl_tsa_mutex_destroy(perl_mutex* mutex)
#endif
-
#ifdef USE_DTRACE
/* log a sub call or return */