From: Hauke Mehrtens Date: Thu, 27 Dec 2012 17:19:40 +0000 (+0100) Subject: compat: fix compiler warning in nla_get_s64() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1b2adee659acf1d3717fa692d0ce9990f8f87c79;p=openwrt%2Fstaging%2Fblogic.git compat: fix compiler warning in nla_get_s64() This fixes the following warning: compat/include/linux/compat-3.7.h: In function ‘nla_get_s64’: compat/include/linux/compat-3.7.h:191:2: warning: passing argument 2 of ‘nla_memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default] In file included from include/net/genetlink.h:5:0, from compat/include/linux/compat-2.6.32.h:12, from compat/include/linux/compat-2.6.29.h:13, from compat/include/linux/compat-2.6.h:50, from :0: Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-3.7.h b/include/linux/compat-3.7.h index bac76a3a114e..6b1d2cfad3b7 100644 --- a/include/linux/compat-3.7.h +++ b/include/linux/compat-3.7.h @@ -184,7 +184,11 @@ static inline s8 nla_get_s8(const struct nlattr *nla) * nla_get_s64 - return payload of s64 attribute * @nla: s64 netlink attribute */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) static inline s64 nla_get_s64(const struct nlattr *nla) +#else +static inline s64 nla_get_s64(struct nlattr *nla) +#endif { s64 tmp;