changeset 2514:e2ef2c23715f draft

Fix compile on Linux
author Roy Marples <roy@marples.name>
date Tue, 03 Jun 2014 21:09:42 +0000
parents 6279f3b8acfc
children 1f5fc94ae1cf
files common.h
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Tue Jun 03 20:52:42 2014 +0000
+++ b/common.h	Tue Jun 03 21:09:42 2014 +0000
@@ -137,7 +137,14 @@
 be32dec(const uint8_t *buf)
 {
 
-	return (uint32_t)(be16dec(buf) << 16 | be16dec(buf + 2));
+	return (uint32_t)((uint32_t)be16dec(buf) << 16 | be16dec(buf + 2));
+}
+
+static inline uint64_t
+be64dec(const uint8_t *buf)
+{
+
+	return (uint64_t)((uint64_t)be32dec(buf) << 32 | be32dec(buf + 4));
 }
 #endif