diff -rupN dnsmasq-2.51/src/dnsmasq.h dnsmasq-2.51-solaris/src/dnsmasq.h --- dnsmasq-2.51/src/dnsmasq.h 2009-10-02 15:12:23.000000000 +0100 +++ dnsmasq-2.51-solaris/src/dnsmasq.h 2009-11-20 18:48:08.351414677 +0000 @@ -16,6 +16,8 @@ #define COPYRIGHT "Copyright (C) 2000-2009 Simon Kelley" +#include "config.h" + #ifndef NO_LARGEFILE /* Ensure we can use files >2GB (log files may grow this big) */ # define _LARGEFILE_SOURCE 1 @@ -43,7 +45,7 @@ /* and this. */ #include -#include "config.h" +/* #include "config.h" */ #define gettext_noop(S) (S) #ifndef LOCALEDIR diff -rupN dnsmasq-2.51/src/log.c dnsmasq-2.51-solaris/src/log.c --- dnsmasq-2.51/src/log.c 2009-08-21 22:22:25.000000000 +0100 +++ dnsmasq-2.51-solaris/src/log.c 2009-11-20 22:04:33.764725603 +0000 @@ -267,7 +267,8 @@ void my_syslog(int priority, const char else if ((LOG_FACMASK & priority) == MS_DHCP) func = "-dhcp"; - priority = LOG_PRI(priority); +/* priority = LOG_PRI(priority); */ + priority = ((priority) & LOG_PRIMASK); if (log_stderr) { diff -rupN dnsmasq-2.51/src/network.c dnsmasq-2.51-solaris/src/network.c --- dnsmasq-2.51/src/network.c 2009-08-25 21:35:28.000000000 +0100 +++ dnsmasq-2.51-solaris/src/network.c 2009-11-20 21:58:47.846885708 +0000 @@ -120,7 +120,7 @@ static int iface_allowed(struct irec **i { struct irec *iface; int fd, mtu = 0, loopback; - struct ifreq ifr; + struct lifreq ifr; int dhcp_ok = 1; struct iname *tmp; @@ -131,7 +131,7 @@ static int iface_allowed(struct irec **i return 1; if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1 || - !indextoname(fd, if_index, ifr.ifr_name) || + !indextoname(fd, if_index, ifr.lifr_name) || ioctl(fd, SIOCGIFFLAGS, &ifr) == -1) { if (fd != -1) @@ -143,10 +143,10 @@ static int iface_allowed(struct irec **i return 0; } - loopback = ifr.ifr_flags & IFF_LOOPBACK; + loopback = ifr.lifr_flags & IFF_LOOPBACK; if (ioctl(fd, SIOCGIFMTU, &ifr) != -1) - mtu = ifr.ifr_mtu; + mtu = ifr.lifr_mtu; close(fd); @@ -156,7 +156,7 @@ static int iface_allowed(struct irec **i { struct iname *lo; for (lo = daemon->if_names; lo; lo = lo->next) - if (lo->name && strcmp(lo->name, ifr.ifr_name) == 0) + if (lo->name && strcmp(lo->name, ifr.lifr_name) == 0) { lo->isloop = 1; break; @@ -164,9 +164,9 @@ static int iface_allowed(struct irec **i if (!lo && (lo = whine_malloc(sizeof(struct iname))) && - (lo->name = whine_malloc(strlen(ifr.ifr_name)+1))) + (lo->name = whine_malloc(strlen(ifr.lifr_name)+1))) { - strcpy(lo->name, ifr.ifr_name); + strcpy(lo->name, ifr.lifr_name); lo->isloop = lo->used = 1; lo->next = daemon->if_names; daemon->if_names = lo; @@ -174,16 +174,16 @@ static int iface_allowed(struct irec **i } if (addr->sa.sa_family == AF_INET && - !iface_check(AF_INET, (struct all_addr *)&addr->in.sin_addr, ifr.ifr_name, NULL)) + !iface_check(AF_INET, (struct all_addr *)&addr->in.sin_addr, ifr.lifr_name, NULL)) return 1; for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next) - if (tmp->name && (strcmp(tmp->name, ifr.ifr_name) == 0)) + if (tmp->name && (strcmp(tmp->name, ifr.lifr_name) == 0)) dhcp_ok = 0; #ifdef HAVE_IPV6 if (addr->sa.sa_family == AF_INET6 && - !iface_check(AF_INET6, (struct all_addr *)&addr->in6.sin6_addr, ifr.ifr_name, NULL)) + !iface_check(AF_INET6, (struct all_addr *)&addr->in6.sin6_addr, ifr.lifr_name, NULL)) return 1; #endif diff -rupN dnsmasq-2.51/src/tftp.c dnsmasq-2.51-solaris/src/tftp.c --- dnsmasq-2.51/src/tftp.c 2009-08-25 20:51:53.000000000 +0100 +++ dnsmasq-2.51-solaris/src/tftp.c 2009-11-20 21:59:41.439478053 +0000 @@ -46,7 +46,7 @@ void tftp_request(struct listener *liste struct sockaddr_in addr, peer; struct msghdr msg; struct iovec iov; - struct ifreq ifr; + struct lifreq ifr; int is_err = 1, if_index = 0, mtu = 0; struct iname *tmp; struct tftp_transfer *transfer; @@ -130,9 +130,9 @@ void tftp_request(struct listener *liste if (tmp->name && (strcmp(tmp->name, name) == 0)) return; - strncpy(name, ifr.ifr_name, IF_NAMESIZE); + strncpy(name, ifr.lifr_name, IF_NAMESIZE); if (ioctl(listen->tftpfd, SIOCGIFMTU, &ifr) != -1) - mtu = ifr.ifr_mtu; + mtu = ifr.lifr_mtu; } addr.sin_port = htons(port);