diff -Nru expat-2.2.1/debian/changelog expat-2.2.1/debian/changelog --- expat-2.2.1/debian/changelog 2017-06-17 20:48:02.000000000 +0000 +++ expat-2.2.1/debian/changelog 2017-06-22 21:05:46.000000000 +0000 @@ -1,3 +1,10 @@ +expat (2.2.1-2) unstable; urgency=medium + + * Fix mis-detection of getrandom() on kFreeBSD. + * Utilize libbsd for arc4random_buf() on kFreeBSD. + + -- Laszlo Boszormenyi (GCS) Thu, 22 Jun 2017 21:05:46 +0000 + expat (2.2.1-1) unstable; urgency=high * New upstream release: diff -Nru expat-2.2.1/debian/control expat-2.2.1/debian/control --- expat-2.2.1/debian/control 2016-05-16 16:34:31.000000000 +0000 +++ expat-2.2.1/debian/control 2017-06-22 21:05:46.000000000 +0000 @@ -5,6 +5,7 @@ Standards-Version: 3.9.8 Build-Depends: debhelper (>= 9), docbook-to-man, dh-autoreconf, dpkg-dev (>= 1.16.0), + libbsd-dev [kfreebsd-amd64 kfreebsd-i386], gcc-multilib [i386 powerpc sparc s390] Homepage: http://expat.sourceforge.net Vcs-Browser: http://svn.debian.org/wsvn/debian-xml-sgml/packages/expat/trunk/ diff -Nru expat-2.2.1/debian/patches/Fix_mis-detection_of_getrandom.patch expat-2.2.1/debian/patches/Fix_mis-detection_of_getrandom.patch --- expat-2.2.1/debian/patches/Fix_mis-detection_of_getrandom.patch 1970-01-01 00:00:00.000000000 +0000 +++ expat-2.2.1/debian/patches/Fix_mis-detection_of_getrandom.patch 2017-06-22 21:05:46.000000000 +0000 @@ -0,0 +1,24 @@ +From 602e6c78ca750c082b72f8cdf4a38839b312959f Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sun, 18 Jun 2017 18:55:10 +0200 +Subject: [PATCH] configure.ac: Fix mis-detection of getrandom on Debian + GNU/kFreeBSD (#50) + +There is no such thing but we need to link (not just compile) to realize. +--- + expat/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1357c9a..444c002 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -130,7 +130,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ + + + AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)]) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include /* for NULL */ + #include + int main() { diff -Nru expat-2.2.1/debian/patches/series expat-2.2.1/debian/patches/series --- expat-2.2.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ expat-2.2.1/debian/patches/series 2017-06-22 21:05:46.000000000 +0000 @@ -0,0 +1 @@ +Fix_mis-detection_of_getrandom.patch diff -Nru expat-2.2.1/debian/rules expat-2.2.1/debian/rules --- expat-2.2.1/debian/rules 2017-01-02 21:12:32.000000000 +0000 +++ expat-2.2.1/debian/rules 2017-06-22 21:05:46.000000000 +0000 @@ -9,6 +9,7 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) BUILD64 = $(filter $(DEB_HOST_ARCH), i386 powerpc sparc s390) @@ -32,6 +33,10 @@ HOST64FLAG = --host=s390x-linux-gnu endif +ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) + CONFFLAGS += --with-libbsd +endif + # -pthread -D_REENTRANT #551079 CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += -Wall