diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2014-02-07 22:28:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-10 09:02:20 +0100 |
commit | b104688cbb9c4d1e04b8a97e64b65a2bca614697 (patch) | |
tree | 5e2a25c85c0dfb0ab3e29a14c78bff390e928108 /include | |
parent | e668dc53365116f5ae57d79a4e4819e7dcf38131 (diff) | |
download | barebox-b104688cbb9c4d1e04b8a97e64b65a2bca614697.tar.gz barebox-b104688cbb9c4d1e04b8a97e64b65a2bca614697.tar.xz |
net: new function net_read_uint64
This is needed for nfs3 support as some types became bigger compared to
nfs2.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/net.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 8388e2f12e..6c86947d9c 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) { |