mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Tweaks to fix compilation on FreeBSD.
This commit is contained in:
@@ -9,11 +9,14 @@
|
|||||||
# If we can find one which matches $v[0-9].* then we assume it's
|
# If we can find one which matches $v[0-9].* then we assume it's
|
||||||
# a version-number tag, else we just use the whole string.
|
# a version-number tag, else we just use the whole string.
|
||||||
|
|
||||||
# we're called with pwd == src
|
# we're called with pwd == TLD
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
if [ -d .git ]; then
|
if which git >/dev/null 2>&1 && [ -d .git ]; then
|
||||||
git describe
|
git describe
|
||||||
|
elif grep '\$Format:%d\$' VERSION >/dev/null 2>&1; then
|
||||||
|
# unsubstituted VERSION, but no git available.
|
||||||
|
echo UNKNOWN
|
||||||
else
|
else
|
||||||
vers=`cat VERSION | sed 's/[(), ]/\n/ g' | grep -m 1 $v[0-9]`
|
vers=`cat VERSION | sed 's/[(), ]/\n/ g' | grep -m 1 $v[0-9]`
|
||||||
|
|
||||||
|
|||||||
@@ -160,11 +160,11 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
if (ioctl(fd, SIOCGIFFLAGS, ifr) != -1)
|
if (ioctl(fd, SIOCGIFFLAGS, ifr) != -1)
|
||||||
{
|
{
|
||||||
flags = ifr.ifr_flags;
|
flags = ifr->ifr_flags;
|
||||||
ifr->ifr_addr.sa_family = AF_LINK;
|
ifr->ifr_addr.sa_family = AF_LINK;
|
||||||
if (ioctl(fd, SIOCGIFADDR, ifr) != -1 &&
|
if (ioctl(fd, SIOCGIFADDR, ifr) != -1 &&
|
||||||
!((*callback)((unsigned int)htons(ETHERTYPE_IP),
|
!((*callback)((unsigned int)htons(ETHERTYPE_IP),
|
||||||
(unsigned int)link->ifi_flags,
|
flags,
|
||||||
LLADDR((struct sockaddr_dl *)&ifr->ifr_addr), ETHER_ADDR_LEN, parm)))
|
LLADDR((struct sockaddr_dl *)&ifr->ifr_addr), ETHER_ADDR_LEN, parm)))
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ void dhcp6_packet(time_t now)
|
|||||||
lease_prune(NULL, now); /* lose any expired leases */
|
lease_prune(NULL, now); /* lose any expired leases */
|
||||||
|
|
||||||
msg.msg_iov = &daemon->dhcp_packet;
|
msg.msg_iov = &daemon->dhcp_packet;
|
||||||
sz = dhcp6_reply(parm.current, if_index, ifr.ifr_name, sz, IN6_IS_ADDR_MULTICAST(&from), now);
|
sz = dhcp6_reply(parm.current, if_index, ifr.ifr_name, sz, IN6_IS_ADDR_MULTICAST(&from.in6.sin6_addr), now);
|
||||||
|
|
||||||
lease_update_file(now);
|
lease_update_file(now);
|
||||||
lease_update_dns();
|
lease_update_dns();
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ static int dhcp6_no_relay(int msg_type, struct dhcp_netid *tags, struct dhcp_con
|
|||||||
int iaid, ia_type = opt6_type(opt);
|
int iaid, ia_type = opt6_type(opt);
|
||||||
void *ia_option, *ia_end;
|
void *ia_option, *ia_end;
|
||||||
unsigned int min_time = 0xffffffff;
|
unsigned int min_time = 0xffffffff;
|
||||||
int t1cntr;
|
int t1cntr = 0;
|
||||||
int address_assigned = 0;
|
int address_assigned = 0;
|
||||||
|
|
||||||
if (ia_type != OPTION6_IA_NA && ia_type != OPTION6_IA_TA)
|
if (ia_type != OPTION6_IA_NA && ia_type != OPTION6_IA_TA)
|
||||||
|
|||||||
Reference in New Issue
Block a user