diff options
Diffstat (limited to 'src/common/swap.h')
| -rw-r--r-- | src/common/swap.h | 10 |
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 @@ | |||
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #if defined(__linux__) | 20 | #if defined(_MSC_VER) |
| 21 | #include <byteswap.h> | 21 | #include <cstdlib> |
| 22 | #elif defined(__linux__) | ||
| 23 | #include <byteswap.h> | ||
| 22 | #elif defined(__FreeBSD__) | 24 | #elif defined(__FreeBSD__) |
| 23 | #include <sys/endian.h> | 25 | #include <sys/endian.h> |
| 24 | #endif | 26 | #endif |
| 25 | 27 | ||
| 28 | #include "common/common_types.h" | ||
| 29 | |||
| 26 | // GCC 4.6+ | 30 | // GCC 4.6+ |
| 27 | #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) | 31 | #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) |
| 28 | 32 | ||