From b104688cbb9c4d1e04b8a97e64b65a2bca614697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 7 Feb 2014 22:28:09 +0100 Subject: [PATCH] net: new function net_read_uint64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed for nfs3 support as some types became bigger compared to nfs2. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- include/net.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/net.h b/include/net.h index 8388e2f12..6c86947d9 100644 --- a/include/net.h +++ b/include/net.h @@ -276,6 +276,13 @@ static inline uint32_t net_read_uint32(void *from) return tmp; } +static inline uint64_t net_read_uint64(void *from) +{ + uint64_t tmp; + memcpy(&tmp, from, sizeof(tmp)); + return tmp; +} + /* write IP *in network byteorder* */ static inline void net_write_ip(void *to, IPaddr_t ip) {