svn commit: r568907 - in head/dns/dnsmasq-devel: . files
Matthias Andree
mandree at FreeBSD.org
Sun Mar 21 08:34:46 UTC 2021
Author: mandree
Date: Sun Mar 21 08:34:45 2021
New Revision: 568907
URL: https://svnweb.freebsd.org/changeset/ports/568907
Log:
dnsmasq-devel: Use original patch from upstream Git to fix compilation.
Added:
head/dns/dnsmasq-devel/files/patch-src_network.c (contents, props changed)
Modified:
head/dns/dnsmasq-devel/Makefile
Modified: head/dns/dnsmasq-devel/Makefile
==============================================================================
--- head/dns/dnsmasq-devel/Makefile Sun Mar 21 08:34:16 2021 (r568906)
+++ head/dns/dnsmasq-devel/Makefile Sun Mar 21 08:34:45 2021 (r568907)
@@ -4,7 +4,7 @@
PORTNAME= dnsmasq
DISTVERSION= 2.85rc1
# Leave the PORTREVISION in even if 0 to avoid accidental PORTEPOCH bumps:
-PORTREVISION= 0
+PORTREVISION= 1
PORTEPOCH= 3 # attn - different between -devel and dnsmasq ports!
CATEGORIES= dns
MASTER_SITES= https://www.thekelleys.org.uk/dnsmasq/release-candidates/ \
@@ -107,7 +107,6 @@ LDFLAGS+= -L${LOCALBASE}/lib ${_intllibs} ${ICONV_LIB}
post-patch:
${REINPLACE_CMD} -e '/^lua_/s/lua5\.2/lua-${LUA_VER}/' ${WRKSRC}/Makefile
- ${REINPLACE_CMD} -e 's/ifr\.ifr_ifindex/ifr.ifr_index/' ${WRKSRC}/src/network.c
pre-configure: pretty-print-config
.if ${PORT_OPTIONS:MIDN}
Added: head/dns/dnsmasq-devel/files/patch-src_network.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/dnsmasq-devel/files/patch-src_network.c Sun Mar 21 08:34:45 2021 (r568907)
@@ -0,0 +1,34 @@
+commit 1de6bbc10872b67f9f54a2511e6750a6071f5544
+Author: Simon Kelley <simon at thekelleys.org.uk>
+Date: Fri Mar 19 22:24:08 2021 +0000
+
+ Fix FTBS on FreeBSD due to Linux-specific optimisation of if_nametoindex()
+
+diff --git a/src/network.c b/src/network.c
+index cca6ff2..b4a8d7d 100644
+--- a/src/network.c
++++ b/src/network.c
+@@ -720,13 +720,17 @@ int enumerate_interfaces(int reset)
+ to a server is specified by an interface, so cache them.
+ Update the cache here. */
+ for (serv = daemon->servers; serv; serv = serv->next)
+- if (strlen(serv->interface) != 0)
++ if (serv->interface[0] != 0)
+ {
+- struct ifreq ifr;
+-
+- safe_strncpy(ifr.ifr_name, serv->interface, IF_NAMESIZE);
+- if (ioctl(param.fd, SIOCGIFINDEX, &ifr) != -1)
+- serv->ifindex = ifr.ifr_ifindex;
++#ifdef HAVE_LINUX_NETWORK
++ struct ifreq ifr;
++
++ safe_strncpy(ifr.ifr_name, serv->interface, IF_NAMESIZE);
++ if (ioctl(param.fd, SIOCGIFINDEX, &ifr) != -1)
++ serv->ifindex = ifr.ifr_ifindex;
++#else
++ serv->ifindex = if_nametoindex(serv->interface);
++#endif
+ }
+
+ again:
More information about the svn-ports-all
mailing list