]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on Linux
authorRoy Marples <roy@marples.name>
Tue, 3 Jun 2014 21:09:42 +0000 (21:09 +0000)
committerRoy Marples <roy@marples.name>
Tue, 3 Jun 2014 21:09:42 +0000 (21:09 +0000)
common.h

index c2ecde69872b77256793bf7d6de28a1a69949283..94c207e8096bc07a22f2daf1d318b30f8045a5bb 100644 (file)
--- a/common.h
+++ b/common.h
@@ -137,7 +137,14 @@ static inline uint32_t
 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