Re: [PATCH net-next v16 26/26] testing/selftests: add test tool and scripts for ovpn module
From: Jakub Kicinski
Date: Thu Dec 19 2024 - 23:02:34 EST
On Thu, 19 Dec 2024 02:42:20 +0100 Antonio Quartulli wrote:
> +uint64_t nla_get_uint(struct nlattr *attr)
> +{
> + if (nla_len(attr) == sizeof(uint32_t))
> + return nla_get_u32(attr);
> + else
> + return nla_get_u64(attr);
> +}
Fedora 41 has: libnl3 3.11.0
which already defines nla_get_uint()
ovpn-cli.c:46:10: error: conflicting types for ‘nla_get_uint’; have ‘uint64_t(struct nlattr *)’ {aka ‘long unsigned int(struct nlattr *)’}
46 | uint64_t nla_get_uint(struct nlattr *attr)
| ^~~~~~~~~~~~
In file included from /usr/include/libnl3/netlink/msg.h:11,
from /usr/include/libnl3/netlink/genl/genl.h:10,
from ovpn-cli.c:26:
/usr/include/libnl3/netlink/attr.h:126:25: note: previous declaration of ‘nla_get_uint’ with type ‘uint64_t(const struct nlattr *)’ {aka ‘long unsigned int(const struct nlattr *)’}
126 | extern uint64_t nla_get_uint(const struct nlattr *);
| ^~~~~~~~~~~~