]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Debian build fixes for kFreeBSD
authorSimon Kelley <simon@thekelleys.org.uk>
Fri, 3 Oct 2014 07:48:11 +0000 (08:48 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Fri, 3 Oct 2014 07:48:11 +0000 (08:48 +0100)
debian/changelog
debian/control
debian/rules
src/tables.c

index a43dffe810d53afa38252ae008d3e7510da4408e..2015e89c3013614aa2a41e8a9cb82c0b848dac17 100644 (file)
@@ -1,3 +1,9 @@
+dnsmasq (2.72-2) unstable; urgency=low
+
+   * Fix build in Debian-kFreeBSD. (closes: #763693)
+
+ -- Simon Kelley <simon@thekelleys.org.uk>  Thu, 02 Oct 2014 22:34:12 +0000
+
 dnsmasq (2.72-1) unstable; urgency=low
 
    * New upstream.
index 78f6c135bdb3a6786d20a7c1f9b6a7ebe04c9bd0..6ed259d4e8abd2aa8811137ef8d3bbb9422437ab 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: optional
 Build-depends: gettext, libnetfilter-conntrack-dev [linux-any],
                libidn11-dev, libdbus-1-dev (>=0.61), libgmp-dev, 
-               nettle-dev (>=2.4-3)
+               nettle-dev (>=2.4-3), libbsd-dev [!linux-any]
 Maintainer: Simon Kelley <simon@thekelleys.org.uk>
 Standards-Version: 3.9.5
 
index 84cfd563938066bc3670c9fac82b681288731fc4..0dcbb30d1a7f7362f31dceca7287fe63f051f2bb 100755 (executable)
@@ -23,7 +23,7 @@ DEB_COPTS = $(COPTS)
 
 TARGET = install-i18n
 
-DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 # Force package version based on git tags.
 ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS)))
@@ -35,7 +35,7 @@ ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS)))
 endif
 
 ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
-ifeq ($(DEB_BUILD_ARCH_OS),linux)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
      DEB_COPTS += -DHAVE_CONNTRACK
 endif
 endif
@@ -83,6 +83,11 @@ ifeq (,$(filter nodnssec,$(DEB_BUILD_OPTIONS)))
      DEB_COPTS += -DHAVE_DNSSEC
 endif
 
+ifneq ($(DEB_HOST_ARCH_OS),linux)
+     # For strlcpy in FreeBSD
+     LDFLAGS += -lbsd
+endif
+
 clean:
        $(checkdir)
        rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files debian/substvars debian/utils-substvars
@@ -171,7 +176,7 @@ endif
        chmod -R g-ws debian/base 
        dpkg --build debian/base ..
 
-ifeq ($(DEB_BUILD_ARCH_OS),linux)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
        rm -rf debian/utils
        install -m 755 -d debian/utils/DEBIAN \
                        -d debian/utils/usr/share/man/man1 \
index 834f11944cd03f615f785b1074ef794ef27c45db..dcdef794c4d2e0e911d465cfa86c0bf7aa194bd3 100644 (file)
 
 #if defined(HAVE_IPSET) && defined(HAVE_BSD_NETWORK)
 
+#ifndef __FreeBSD__
+#include <bsd/string.h>
+#endif
+
 #include <sys/types.h>
 #include <sys/ioctl.h>
 
@@ -136,7 +140,7 @@ int add_to_ipset(const char *setname, const struct all_addr *ipaddr,
       return -1;
     }
   
-  if (rc = pfr_add_tables(&table, 1, &n, 0)) 
+  if ((rc = pfr_add_tables(&table, 1, &n, 0))) 
     {
       my_syslog(LOG_WARNING, _("warning: pfr_add_tables: %s(%d)"),
                pfr_strerror(errno),rc);