aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 95a22c69..b7a80fe2 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -43,6 +43,16 @@
# endif
#endif /* !defined(HAVE_STRTOULL) */
+#ifdef HAVE_BYTESWAP_H
+#include <byteswap.h>
+#endif
+
+#ifndef bswap_32
+#define bswap_32(x) \
+ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+#endif
+
#ifdef _WIN32
/* Imitate define of inttypes.h */