Tweaks to fix compilation on FreeBSD.

This commit is contained in:
Simon Kelley
2012-02-10 22:16:45 +00:00
parent 6ea6dcf05b
commit 98d76a0326
4 changed files with 10 additions and 7 deletions

View File

@@ -9,11 +9,14 @@
# 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.
# we're called with pwd == src
# we're called with pwd == TLD
cd ..
if [ -d .git ]; then
if which git >/dev/null 2>&1 && [ -d .git ]; then
git describe
elif grep '\$Format:%d\$' VERSION >/dev/null 2>&1; then
# unsubstituted VERSION, but no git available.
echo UNKNOWN
else
vers=`cat VERSION | sed 's/[(), ]/\n/ g' | grep -m 1 $v[0-9]`

View File

@@ -160,11 +160,11 @@ int iface_enumerate(int family, void *parm, int (*callback)())
unsigned int flags;
if (ioctl(fd, SIOCGIFFLAGS, ifr) != -1)
{
flags = ifr.ifr_flags;
flags = ifr->ifr_flags;
ifr->ifr_addr.sa_family = AF_LINK;
if (ioctl(fd, SIOCGIFADDR, ifr) != -1 &&
!((*callback)((unsigned int)htons(ETHERTYPE_IP),
(unsigned int)link->ifi_flags,
flags,
LLADDR((struct sockaddr_dl *)&ifr->ifr_addr), ETHER_ADDR_LEN, parm)))
goto err;
}

View File

@@ -212,7 +212,7 @@ void dhcp6_packet(time_t now)
lease_prune(NULL, now); /* lose any expired leases */
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_dns();

View File

@@ -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);
void *ia_option, *ia_end;
unsigned int min_time = 0xffffffff;
int t1cntr;
int t1cntr = 0;
int address_assigned = 0;
if (ia_type != OPTION6_IA_NA && ia_type != OPTION6_IA_TA)