From: Roy Marples Date: Tue, 3 Jun 2014 21:09:42 +0000 (+0000) Subject: Fix compile on Linux X-Git-Tag: v6.4.0~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f969dd2a71ccaceaeea5ed64af4e1700afde1079;p=thirdparty%2Fdhcpcd.git Fix compile on Linux --- diff --git a/common.h b/common.h index c2ecde69..94c207e8 100644 --- 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