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 *);
      |                         ^~~~~~~~~~~~

Reply via email to