From ccf055f9aac544ece020082865a9fe374ee7340f Mon Sep 17 00:00:00 2001 From: Nathaniel Woods Date: Mon, 13 Feb 2023 19:27:54 -0500 Subject: [PATCH] Added !defined(HB_NO_MT) to conditional compilation that does '#include ' The `#include ` declaration causes problems for WebAssembler, a single threaded platform. HarfBuzz already has a preexisting macro to disable multithreading, so we're using that. --- src/hb-atomic.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-atomic.hh b/src/hb-atomic.hh index a47493035..cf36c9fd6 100644 --- a/src/hb-atomic.hh +++ b/src/hb-atomic.hh @@ -114,7 +114,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #ifndef _hb_compiler_memory_r_barrier /* This we always use std::atomic for; and should never be disabled... * except that MSVC gives me an internal compiler error on it. */ -#if !defined(_MSC_VER) +#if !defined(HB_NO_MT) && !defined(_MSC_VER) #include #define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire) #else