• Klemens Nanni's avatar
    Use ifr_index to fix build on OpenBSD · 37f1e243
    Klemens Nanni authored
    `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.
    37f1e243
interfaces.c 23.7 KB