Hi! On Wed, 2014-10-01 at 22:24:29 +0100, Steven Chamberlain wrote: > Package: dnsmasq > Version: 2.72-1 > Severity: serious > Tags: patch > User: debian-...@lists.debian.org > Usertags: kfreebsd
> dnsmasq FTBFS on kfreebsd, because it builds some code to use FreeBSD > PF, which also uses strlcpy, which is only found in FreeBSD libc. > > For Debian GNU/kFreeBSD it is possible to get this function from libbsd; > patch attached! > diff -Nru dnsmasq-2.72.orig/debian/rules dnsmasq-2.72/debian/rules > --- dnsmasq-2.72.orig/debian/rules 2014-10-01 21:57:13.000000000 +0100 > +++ dnsmasq-2.72/debian/rules 2014-10-01 22:05:34.282734624 +0100 > @@ -83,6 +83,11 @@ > DEB_COPTS += -DHAVE_DNSSEC > endif > > +ifneq ($(DEB_BUILD_ARCH_OS),linux) This should be DEB_HOST_ARCH_OS. > + # For strlcpy > + LDFLAGS += -lbsd > +endif > + > clean: > $(checkdir) > rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files > debian/substvars debian/utils-substvars > diff -Nru dnsmasq-2.72.orig/src/tables.c dnsmasq-2.72/src/tables.c > --- dnsmasq-2.72.orig/src/tables.c 2014-10-01 22:05:38.761734000 +0100 > +++ dnsmasq-2.72/src/tables.c 2014-10-01 22:06:03.831679913 +0100 > @@ -19,6 +19,9 @@ > #include "dnsmasq.h" > > #if defined(HAVE_IPSET) && defined(HAVE_BSD_NETWORK) > +#ifndef __FreeBSD__ > +#include <bsd/string.h> > +#endif The other option is to use the libbsd overlay, which should require no upstream source patching. Either through pkg-config, or passing the equivalent output to CPPFLAGS: $ pkg-config --cflags libbsd-overlay But it needs to be tested as it could meddle with the build. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org