Re: invalid conversion from ‘void*’ to ‘nlattr*’ for nla_for_each_nested() in c++

Przemysław Szczerbik przemekszczerbik at gmail.com
Thu Jul 21 08:08:07 PDT 2016


Hi,

This issue has been fixed:
http://lists.infradead.org/pipermail/libnl/2016-February/002096.html
Most likely you are using older libnl version, which doesn't include this patch.
Thus, I recommend upgrading to the latest release.

Regards,
Przemek

2016-07-21 14:10 GMT+02:00 Avery Rozar <avery.rozar at insecure-it.com>:
> I'm using libnl3 and nl80211.h to get the available bands for a
> connected wireless interface. My IDE (CLion) my hi-lights
> “nla_for_each_nested()” red with the error incompatible pointer type
> 'nlattr *' and 'void *’.
>
> When I compile my program I get this error.
>
> error: invalid conversion from ‘void*’ to ‘nlattr*’ [-fpermissive] for
> (pos = nla_data(nla), rem = nla_len(nla);
>
>
> Thanks,
> Avery
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl



More information about the libnl mailing list