From 88b8a4f59674c620998e413737275d73f9bd4407 Mon Sep 17 00:00:00 2001 From: Ian Muldoon Date: Tue, 10 Dec 2019 12:36:09 -0800 Subject: [PATCH] Change once_flag.flag brace initialization to assignment. This fixes a build issue in some environments where PTHREAD_ONCE_INIT is a braced value, resulting int double brace initialization. --- .../include/wtf/platform/platform_aux_pthreads_threaded_inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/cpp/include/wtf/platform/platform_aux_pthreads_threaded_inl.h b/bindings/cpp/include/wtf/platform/platform_aux_pthreads_threaded_inl.h index 4e3cc3f8..56cc7287 100644 --- a/bindings/cpp/include/wtf/platform/platform_aux_pthreads_threaded_inl.h +++ b/bindings/cpp/include/wtf/platform/platform_aux_pthreads_threaded_inl.h @@ -30,7 +30,7 @@ using std::memory_order_relaxed; using std::memory_order_release; using std::memory_order_seq_cst; -using once_flag = struct { pthread_once_t flag{PTHREAD_ONCE_INIT}; }; +using once_flag = struct { pthread_once_t flag = PTHREAD_ONCE_INIT; }; template inline void call_once(once_flag& once, T func) {