Move the ifr_ifindex FreeBSD definition into a header file to reduce code duplication

This commit is contained in:
Gleb Popov 2024-09-21 20:30:11 +03:00 committed by Wim Taymans
parent 3f31935cac
commit aafe815556
6 changed files with 4 additions and 17 deletions

View file

@ -8,6 +8,10 @@
#include <net/if.h>
#include <errno.h>
#ifdef __FreeBSD__
#define ifr_ifindex ifr_index
#endif
static inline int pw_net_parse_address(const char *address, uint16_t port,
struct sockaddr_storage *addr, socklen_t *len)
{