diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-11-02 22:27:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-11-02 22:27:03 +0900 |
commit | e2909570bb00c7c6056638b71c1d3c363dc0d40d (patch) | |
tree | fab8fa64286c29cb646d4746436756ceca37ca01 | |
parent | 24f7829abfd29fc226e38829caaecaa76885afbf (diff) |
Include windows.h for `LONG` and `Interlocked` functions
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11985
-rw-r--r-- | include/ruby/atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <winsock2.h> // to prevent macro redefinitions +# include <windows.h> // for `LONG` and `Interlocked` functions typedef LONG rb_atomic_t; #elif defined(__sun) && defined(HAVE_ATOMIC_H) typedef unsigned int rb_atomic_t; |