summaryrefslogtreecommitdiff
path: root/source/n/dnsmasq
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-12-03 19:07:24 +0000
committerEric Hameleers <alien@slackware.com>2019-12-04 08:59:50 +0100
commitd29002b2b2bba13ec5d668a22febddf2e4001f62 (patch)
tree7f3c963421bdacb55eb3bdf675bd15d547381952 /source/n/dnsmasq
parent4355ff4c77d0aea75488f167a7cb890c80d1164b (diff)
downloadcurrent-d29002b2b2bba13ec5d668a22febddf2e4001f62.tar.gz
Tue Dec 3 19:07:24 UTC 201920191203190724
n/ebtables-2.0.11-x86_64-1.txz: Upgraded. n/iptables-1.8.4-x86_64-1.txz: Upgraded. n/libnftnl-1.1.5-x86_64-1.txz: Upgraded. n/nftables-0.9.3-x86_64-1.txz: Upgraded. n/whois-5.5.3-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/n/dnsmasq')
-rw-r--r--source/n/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch60
-rwxr-xr-xsource/n/dnsmasq/dnsmasq.SlackBuild3
2 files changed, 63 insertions, 0 deletions
diff --git a/source/n/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch b/source/n/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
new file mode 100644
index 00000000..3a32bb82
--- /dev/null
+++ b/source/n/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
@@ -0,0 +1,60 @@
+From 31e14f6e52677c675ee4683f9daab5bf21c07dd6 Mon Sep 17 00:00:00 2001
+From: Petr Mensik <pemensik@redhat.com>
+Date: Wed, 31 Jul 2019 20:35:35 +0200
+Subject: [PATCH] Recent kernel no longer supports SIOCGSTAMP
+
+Build without it defined by kernel headers. Do not try SO_TIMESTAMP
+until fixed properly.
+---
+ src/dhcp.c | 32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+diff --git a/src/dhcp.c b/src/dhcp.c
+index f8d323b..9afdccf 100644
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -178,23 +178,27 @@ void dhcp_packet(time_t now, int pxe_fd)
+ (sz < (ssize_t)(sizeof(*mess) - sizeof(mess->options))))
+ return;
+
+- #if defined (HAVE_LINUX_NETWORK)
+- if (ioctl(fd, SIOCGSTAMP, &tv) == 0)
++#if defined (HAVE_LINUX_NETWORK)
++#ifdef SIOCGSTAMP
++ if (tv.tv_sec == 0 && ioctl(fd, SIOCGSTAMP, &tv) == 0)
+ recvtime = tv.tv_sec;
++#endif
+
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+- for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
+- if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
+- {
+- union {
+- unsigned char *c;
+- struct in_pktinfo *p;
+- } p;
+- p.c = CMSG_DATA(cmptr);
+- iface_index = p.p->ipi_ifindex;
+- if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
+- unicast_dest = 1;
+- }
++ {
++ for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
++ if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
++ {
++ union {
++ unsigned char *c;
++ struct in_pktinfo *p;
++ } p;
++ p.c = CMSG_DATA(cmptr);
++ iface_index = p.p->ipi_ifindex;
++ if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
++ unicast_dest = 1;
++ }
++ }
+
+ #elif defined(HAVE_BSD_NETWORK)
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+--
+2.20.1
+
diff --git a/source/n/dnsmasq/dnsmasq.SlackBuild b/source/n/dnsmasq/dnsmasq.SlackBuild
index 49d44549..aefcd291 100755
--- a/source/n/dnsmasq/dnsmasq.SlackBuild
+++ b/source/n/dnsmasq/dnsmasq.SlackBuild
@@ -67,6 +67,9 @@ zcat $CWD/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig
# Use libidn2:
zcat $CWD/dnsmasq.libidn2.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+# Fix build with Linux 5.4.x:
+zcat $CWD/dnsmasq-2.80-SIOCGSTAMP.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
make $NUMJOBS all-i18n PREFIX=/usr MANDIR=/usr/man || exit 1
make install-i18n PREFIX=/usr DESTDIR=$PKG MANDIR=/usr/man || exit 1
chmod 0755 $PKG/usr/sbin/dnsmasq