diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2021-03-21 08:34:45 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2021-03-21 08:34:45 +0000 |
commit | 16629dd72ea16ae3c8803af41c5e9d6e2ecbb1d3 (patch) | |
tree | 3d887523a6d5688bf977b9b3e857a4629ad89703 /dns | |
parent | math/cadabra2: Fix packaging with Python 3.8 and onward (diff) |
dnsmasq-devel: Use original patch from upstream Git to fix compilation.
Notes
Notes:
svn path=/head/; revision=568907
Diffstat (limited to 'dns')
-rw-r--r-- | dns/dnsmasq-devel/Makefile | 3 | ||||
-rw-r--r-- | dns/dnsmasq-devel/files/patch-src_network.c | 34 |
2 files changed, 35 insertions, 2 deletions
diff --git a/dns/dnsmasq-devel/Makefile b/dns/dnsmasq-devel/Makefile index 9e73f5874edc..9b51f589fce7 100644 --- a/dns/dnsmasq-devel/Makefile +++ b/dns/dnsmasq-devel/Makefile @@ -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} diff --git a/dns/dnsmasq-devel/files/patch-src_network.c b/dns/dnsmasq-devel/files/patch-src_network.c new file mode 100644 index 000000000000..4518853d70eb --- /dev/null +++ b/dns/dnsmasq-devel/files/patch-src_network.c @@ -0,0 +1,34 @@ +commit 1de6bbc10872b67f9f54a2511e6750a6071f5544 +Author: Simon Kelley <simon@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: |