support multiple ip addresses on same interface

This commit is contained in:
nickkelsey 2019-06-08 09:06:19 -07:00 committed by Pavel Koshevoy
commit 2854cdb3fc

View file

@ -20,7 +20,7 @@
#include "hdhomerun.h" #include "hdhomerun.h"
#if defined(LIBHDHOMERUN_USE_LEGACY_SIOCGIFCONF) #if defined(LIBHDHOMERUN_USE_SIOCGIFCONF)
#include <sys/ioctl.h> #include <sys/ioctl.h>
#else #else
#include <ifaddrs.h> #include <ifaddrs.h>
@ -36,7 +36,7 @@ struct hdhomerun_sock_t {
int sock; int sock;
}; };
#if defined(LIBHDHOMERUN_USE_LEGACY_SIOCGIFCONF) #if defined(LIBHDHOMERUN_USE_SIOCGIFCONF)
int hdhomerun_local_ip_info(struct hdhomerun_local_ip_info_t ip_info_list[], int max_count) int hdhomerun_local_ip_info(struct hdhomerun_local_ip_info_t ip_info_list[], int max_count)
{ {
int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);