aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_win32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h
index 03f1389df..00bebe6ca 100644
--- a/src/include/ndpi_win32.h
+++ b/src/include/ndpi_win32.h
@@ -82,4 +82,7 @@ typedef unsigned __int64 u_int64_t;
#define sleep(a /* sec */) Sleep(1000*a /* ms */)
+/* https://stackoverflow.com/questions/7993050/multiplatform-atomic-increment */
+#define __sync_fetch_and_add(a,b) InterlockedExchangeAdd ((a), b)
+
#endif /* __NDPI_WIN32_H__ */