summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-02-26 21:15:11 -0800
committerGarrett D'Amore <garrett@damore.org>2020-02-26 21:15:11 -0800
commit0f9b46affd338a52ec8d361bf0cf337c4a0546ea (patch)
treead219fd617b541dc28f81e46385105b9d602aa39 /src
parentabab1392c11395d387e3072c4f5788d284846093 (diff)
downloadnng-0f9b46affd338a52ec8d361bf0cf337c4a0546ea.tar.gz
nng-0f9b46affd338a52ec8d361bf0cf337c4a0546ea.tar.bz2
nng-0f9b46affd338a52ec8d361bf0cf337c4a0546ea.zip
fixes #1210 Undefined reference to InterlockedAddNoFence (mingw64)
Diffstat (limited to 'src')
-rw-r--r--src/platform/windows/win_thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c
index 5d98ddde..785376df 100644
--- a/src/platform/windows/win_thread.c
+++ b/src/platform/windows/win_thread.c
@@ -16,6 +16,8 @@
// mingw does not define InterlockedAddNoFence64, use the mingw equivalent
#if defined(__MINGW32__) || defined(__MINGW64__)
+#define InterlockedAddNoFence(a, b) \
+ __atomic_add_fetch(a, b, __ATOMIC_RELAXED)
#define InterlockedAddNoFence64(a, b) \
__atomic_add_fetch(a, b, __ATOMIC_RELAXED)
#define InterlockedIncrementAcquire64(a) \