summaryrefslogtreecommitdiffstats
path: root/src/common/swap.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/swap.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/swap.h b/src/common/swap.h
index 588cebc70..b92e5bfa4 100644
--- a/src/common/swap.h
+++ b/src/common/swap.h
@@ -17,12 +17,16 @@
#pragma once
-#if defined(__linux__)
-#include <byteswap.h>
+#if defined(_MSC_VER)
+ #include <cstdlib>
+#elif defined(__linux__)
+ #include <byteswap.h>
#elif defined(__FreeBSD__)
-#include <sys/endian.h>
+ #include <sys/endian.h>
#endif
+#include "common/common_types.h"
+
// GCC 4.6+
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)