summaryrefslogtreecommitdiff
path: root/src/thread-utils.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-03-21 19:44:43 +0200
committerVicent Marti <tanoku@gmail.com>2011-03-22 20:38:30 +0200
commitb932ef5b3d77b26b8f558bafa3ee416595279dce (patch)
tree5dd5b88fc017c1ced253084097858ff1ae6c738a /src/thread-utils.h
parent567fc1d20c734c34dd1c4c19be12abcc1622aa5d (diff)
downloadlibgit2-b932ef5b3d77b26b8f558bafa3ee416595279dce.tar.gz
Fix MSVC warnings when building threads
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r--src/thread-utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index e542639c8..20d6022ea 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -5,7 +5,11 @@
/* Common operations even if threading has been disabled */
typedef struct {
+#if defined(_MSC_VER)
+ volatile long val;
+#else
volatile int val;
+#endif
} git_atomic;
GIT_INLINE(void) git_atomic_set(git_atomic *a, int val)