Skip to content

Commit 7f2b6da

Browse files
committed
Fix BSD compilation
1 parent 49873ec commit 7f2b6da

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Memory.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ namespace kanzi {
5757
}
5858

5959

60-
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__bsdi__) && !defined(__DragonFly__) && !defined(BSD)
61-
static inline uint32 bswap32(uint32 x) {
60+
static inline uint32 bswap32(uint32 x) {
6261
#if defined(__clang__)
6362
return __builtin_bswap32(x);
6463
#elif defined(__GNUC__) && (__GNUC__ >= 5)
@@ -75,7 +74,7 @@ namespace kanzi {
7574
}
7675

7776

78-
static inline uint16 bswap16(uint16 x) {
77+
static inline uint16 bswap16(uint16 x) {
7978
#if defined(__clang__)
8079
return __builtin_bswap16(x);
8180
#elif defined(__GNUC__) && (__GNUC__ >= 5)
@@ -88,7 +87,7 @@ namespace kanzi {
8887
}
8988

9089

91-
static inline uint64 bswap64(uint64 x) {
90+
static inline uint64 bswap64(uint64 x) {
9291
#if defined(__clang__)
9392
return __builtin_bswap64(x);
9493
#elif defined(__GNUC__) && (__GNUC__ >= 5)
@@ -107,7 +106,6 @@ namespace kanzi {
107106
#endif
108107
}
109108

110-
#endif
111109

112110
#ifndef IS_BIG_ENDIAN
113111
#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \

0 commit comments

Comments
 (0)