diff options
author | Thomas Haller <thaller@redhat.com> | 2014-01-02 10:00:31 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-01-02 10:56:56 (GMT) |
commit | 2cf635b06a678ebe09d6ea6db72bc09de09f84c8 (patch) | |
tree | a60845312967a3d31d74bc95acddfa7bca680eef /lib/route/link.c | |
parent | 62c37faa3fa3c3305b33a27a40e88692d8fd6ad3 (diff) | |
download | libnl-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.c | 4 |
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) { |