fix build on aarch64

This commit is contained in:
Peter Robinson 2014-11-28 13:39:55 +00:00
parent 3249758581
commit fb8c9b5d1d
2 changed files with 28 additions and 1 deletions

22
unbound-aarch64.patch Normal file
View File

@ -0,0 +1,22 @@
Index: unbound-1.5.0/compat/getentropy_linux.c
===================================================================
--- unbound-1.5.0.orig/compat/getentropy_linux.c
+++ unbound-1.5.0/compat/getentropy_linux.c
@@ -102,7 +102,7 @@ getentropy(void *buf, size_t len)
if (ret != -1)
return (ret);
-#ifdef CTL_MAXNAME
+#ifdef SYS__sysctl
/*
* Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID.
* sysctl is a failsafe API, so it guarantees a result. This
@@ -235,7 +235,7 @@ nodevrandom:
return -1;
}
-#ifdef CTL_MAXNAME
+#ifdef SYS__sysctl
static int
getentropy_sysctl(void *buf, size_t len)
{

View File

@ -19,7 +19,7 @@
Summary: Validating, recursive, and caching DNS(SEC) resolver Summary: Validating, recursive, and caching DNS(SEC) resolver
Name: unbound Name: unbound
Version: 1.5.0 Version: 1.5.0
Release: 2%{?dist} Release: 3%{?dist}
License: BSD License: BSD
Url: http://www.nlnetlabs.nl/unbound/ Url: http://www.nlnetlabs.nl/unbound/
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
@ -42,6 +42,7 @@ Source15: unbound.cron
Source16: unbound-munin.README Source16: unbound-munin.README
Patch0: unbound-1.5.0-arc4random-race-condition.patch Patch0: unbound-1.5.0-arc4random-race-condition.patch
Patch1: unbound-aarch64.patch
Group: System Environment/Daemons Group: System Environment/Daemons
BuildRequires: flex, openssl-devel BuildRequires: flex, openssl-devel
@ -116,6 +117,7 @@ Python modules and extensions for unbound
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .arc4random_fix %patch0 -p1 -b .arc4random_fix
%patch1 -p1 -b .aarch64
%build %build
@ -294,6 +296,9 @@ exit 0
/bin/systemctl try-restart unbound-keygen.service >/dev/null 2>&1 || : /bin/systemctl try-restart unbound-keygen.service >/dev/null 2>&1 || :
%changelog %changelog
* Fri Nov 28 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.5.0-3
- fix build on aarch64
* Wed Nov 26 2014 Tomas Hozza <thozza@redhat.com> - 1.5.0-2 * Wed Nov 26 2014 Tomas Hozza <thozza@redhat.com> - 1.5.0-2
- Fix race condition in arc4random (#1166878) - Fix race condition in arc4random (#1166878)