From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 18 Aug 2021 11:25:39 +0200
Subject: fix: _ReadBarrier undefined symbol error on WOA arm64

The _ReadBarrier compiler intrinsic isn't present on WOA arm64 devices
and as such is crashing in CI. This fixes the issue by defining them
if they're missing.

We should upstream or otherwise handle this.

diff --git a/deps/histogram/src/hdr_atomic.h b/deps/histogram/src/hdr_atomic.h
index 11b0cbd3facfdce648d7cf59ef3418e4e1049090..e1dfeaed6f0dd38aed5a0ddd5660d5b4ba4f46ab 100644
--- a/deps/histogram/src/hdr_atomic.h
+++ b/deps/histogram/src/hdr_atomic.h
@@ -14,6 +14,13 @@
 #include <intrin.h>
 #include <stdbool.h>
 
+#if !defined(_ReadBarrier) || !defined(_WriteBarrier)
+
+#define _ReadBarrier() __asm__ __volatile__("" ::: "memory")
+#define _WriteBarrier() __asm__ __volatile__("" ::: "memory")
+
+#endif
+
 static void __inline * hdr_atomic_load_pointer(void** pointer)
 {
 	_ReadBarrier();
