Skip to content

Use ifr_index to fix build on OpenBSD

Klemens Nanni requested to merge klemens/libnice:ifr_index into master

struct ifreq from <net/if.h> has no ifr_ifindex on OpenBSD. The canonical member access macro in all BSDs is

#define ifr_index       ifr_ifru.ifru_index     /* interface index */

The existing g_critical() message already uses the correct name, so rectify the rest.

FreeBSD has ifr_ifindex in what appears to be linux-compat code.

Found by updating libnice from 0.1.19 to 0.1.20 on OpenBSD/amd64 -current.

Edited by Klemens Nanni

Merge request reports