compat: fix compiler warning in nla_get_s64()
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 27 Dec 2012 17:19:40 +0000 (18:19 +0100)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 28 Dec 2012 15:37:18 +0000 (07:37 -0800)
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 <command-line>:0:

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
include/linux/compat-3.7.h

index bac76a3a114e494cefc40c5d6a30c44928f0f415..6b1d2cfad3b7dde64f56ebe049e39d8dfd197beb 100644 (file)
@@ -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;