From e2909570bb00c7c6056638b71c1d3c363dc0d40d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 2 Nov 2024 22:27:03 +0900 Subject: [PATCH] Include windows.h for `LONG` and `Interlocked` functions --- include/ruby/atomic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ruby/atomic.h b/include/ruby/atomic.h index d786df20c9..18072f4810 100644 --- a/include/ruby/atomic.h +++ b/include/ruby/atomic.h @@ -72,6 +72,8 @@ typedef unsigned int rb_atomic_t; #elif defined(HAVE_GCC_SYNC_BUILTINS) typedef unsigned int rb_atomic_t; #elif defined(_WIN32) +# include // to prevent macro redefinitions +# include // for `LONG` and `Interlocked` functions typedef LONG rb_atomic_t; #elif defined(__sun) && defined(HAVE_ATOMIC_H) typedef unsigned int rb_atomic_t;