Skip to content

Commit e290957

Browse files
committed
Include windows.h for LONG and Interlocked functions
1 parent 24f7829 commit e290957

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/ruby/atomic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ typedef unsigned int rb_atomic_t;
7272
#elif defined(HAVE_GCC_SYNC_BUILTINS)
7373
typedef unsigned int rb_atomic_t;
7474
#elif defined(_WIN32)
75+
# include <winsock2.h> // to prevent macro redefinitions
76+
# include <windows.h> // for `LONG` and `Interlocked` functions
7577
typedef LONG rb_atomic_t;
7678
#elif defined(__sun) && defined(HAVE_ATOMIC_H)
7779
typedef unsigned int rb_atomic_t;

0 commit comments

Comments
 (0)