summaryrefslogtreecommitdiffstats
path: root/lib/route/link.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-01-02 10:00:31 (GMT)
committerThomas Haller <thaller@redhat.com>2014-01-02 10:56:56 (GMT)
commit2cf635b06a678ebe09d6ea6db72bc09de09f84c8 (patch)
treea60845312967a3d31d74bc95acddfa7bca680eef /lib/route/link.c
parent62c37faa3fa3c3305b33a27a40e88692d8fd6ad3 (diff)
downloadlibnl-2cf635b06a678ebe09d6ea6db72bc09de09f84c8.zip
libnl-2cf635b06a678ebe09d6ea6db72bc09de09f84c8.tar.gz
libnl-2cf635b06a678ebe09d6ea6db72bc09de09f84c8.tar.bz2
route: add libnl name prefix to global variable link_policy
Public names should be prefixed with a libnl specific prefix to avoid name collisions. Rename link_policy to rtln_link_policy. Related bugs: https://github.com/thom311/libnl/issues/52 https://bugzilla.gnome.org/show_bug.cgi?id=720902 https://bugs.gentoo.org/show_bug.cgi?id=494986 https://bugs.gentoo.org/show_bug.cgi?id=494890 Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route/link.c')
-rw-r--r--lib/route/link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/route/link.c b/lib/route/link.c
index 4bcf615..9979b5b 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -262,7 +262,7 @@ static int link_clone(struct nl_object *_dst, struct nl_object *_src)
return 0;
}
-struct nla_policy link_policy[IFLA_MAX+1] = {
+struct nla_policy rtln_link_policy[IFLA_MAX+1] = {
[IFLA_IFNAME] = { .type = NLA_STRING,
.maxlen = IFNAMSIZ },
[IFLA_MTU] = { .type = NLA_U32 },
@@ -481,7 +481,7 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
int err, family;
struct nla_policy real_link_policy[IFLA_MAX+1];
- memcpy(&real_link_policy, link_policy, sizeof(link_policy));
+ memcpy(&real_link_policy, rtln_link_policy, sizeof(rtln_link_policy));
link = rtnl_link_alloc();
if (link == NULL) {