aboutsummaryrefslogtreecommitdiff
path: root/osc.lv2
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-30 17:14:48 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-05-30 17:14:48 +0200
commit0f69bfebd8edf63fe43a6bbc0d9ddea3b62633fe (patch)
tree3a70699432c4d4d01272148bcaaec225ab1cfad6 /osc.lv2
parentea2a418f97941a894698baff9e334bce6486fdb5 (diff)
downloadsherlock.lv2-0f69bfebd8edf63fe43a6bbc0d9ddea3b62633fe.tar.xz
mingw: define htonll/ntohll.
Diffstat (limited to 'osc.lv2')
-rw-r--r--osc.lv2/endian.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/osc.lv2/endian.h b/osc.lv2/endian.h
index 99845d0..a7aad4a 100644
--- a/osc.lv2/endian.h
+++ b/osc.lv2/endian.h
@@ -74,6 +74,17 @@
# define htole32(x) (x)
# define be32toh(x) ntohl(x)
# define le32toh(x) (x)
+
+# ifndef htonll
+static inline uint64_t htonll(uint64_t n)
+{
+ return (((uint64_t)htonl(n)) << 32) + htonl(n >> 32);
+}
+# endif
+
+# ifndef ntohll
+# define ntohll htonll
+# endif
# define htobe64(x) htonll(x)
# define htole64(x) (x)
@@ -115,4 +126,4 @@
#endif
-#endif \ No newline at end of file
+#endif