Add upstream patch to fix aarch64 builds
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
9090083edd
commit
bd8f350fdf
36
2524.patch
Normal file
36
2524.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From eb5552190000b9699bba33e1e419f500c7bd18b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Noordhuis <info@bnoordhuis.nl>
|
||||||
|
Date: Sat, 19 Oct 2019 09:54:46 +0200
|
||||||
|
Subject: [PATCH] linux: fix arm64 SYS__sysctl build breakage
|
||||||
|
|
||||||
|
The arm64 architecture never had a _sysctl system call and therefore
|
||||||
|
doesn't have a SYS__sysctl define either. Always return UV_ENOSYS.
|
||||||
|
|
||||||
|
Fixes: https://github.com/libuv/libuv/issues/2522
|
||||||
|
---
|
||||||
|
src/unix/random-sysctl.c | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/unix/random-sysctl.c b/src/unix/random-sysctl.c
|
||||||
|
index 7af2e32070..fb182ded09 100644
|
||||||
|
--- a/src/unix/random-sysctl.c
|
||||||
|
+++ b/src/unix/random-sysctl.c
|
||||||
|
@@ -65,9 +65,18 @@ int uv__random_sysctl(void* buf, size_t buflen) {
|
||||||
|
* an okay trade-off for the fallback of the fallback: this function is
|
||||||
|
* only called when neither getrandom(2) nor /dev/urandom are available.
|
||||||
|
* Fails with ENOSYS on kernels configured without CONFIG_SYSCTL_SYSCALL.
|
||||||
|
+ * At least arm64 never had a _sysctl system call and therefore doesn't
|
||||||
|
+ * have a SYS__sysctl define either.
|
||||||
|
*/
|
||||||
|
+#ifdef SYS__sysctl
|
||||||
|
if (syscall(SYS__sysctl, &args) == -1)
|
||||||
|
return UV__ERR(errno);
|
||||||
|
+#else
|
||||||
|
+ {
|
||||||
|
+ (void) &args;
|
||||||
|
+ return UV_ENOSYS;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (n != sizeof(uuid))
|
||||||
|
return UV_EIO; /* Can't happen. */
|
12
libuv.spec
12
libuv.spec
@ -1,7 +1,7 @@
|
|||||||
Name: libuv
|
Name: libuv
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.33.0
|
Version: 1.33.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Platform layer for node.js
|
Summary: Platform layer for node.js
|
||||||
|
|
||||||
# the licensing breakdown is described in detail in the LICENSE file
|
# the licensing breakdown is described in detail in the LICENSE file
|
||||||
@ -13,6 +13,12 @@ Source2: %{name}.pc.in
|
|||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
|
# -- Patches -- #
|
||||||
|
# Upstream patch to fix builds on aarch64
|
||||||
|
# https://github.com/libuv/libuv/pull/2524
|
||||||
|
Patch0001: 2524.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
|
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
|
||||||
Windows and libev on Unix systems. We intend to eventually contain all platform
|
Windows and libev on Unix systems. We intend to eventually contain all platform
|
||||||
@ -32,6 +38,7 @@ Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
|
|||||||
%description static
|
%description static
|
||||||
Static library (.a) version of libuv.
|
Static library (.a) version of libuv.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-v%{version} -p1
|
%autosetup -n %{name}-v%{version} -p1
|
||||||
|
|
||||||
@ -68,6 +75,9 @@ rm -f %{buildroot}%{_libdir}/libuv.la
|
|||||||
%{_libdir}/%{name}.a
|
%{_libdir}/%{name}.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 21 2019 Stephen Gallagher <sgallagh@redhat.com> - 1.33.0-2
|
||||||
|
- Add upstream patch to fix aarch64 builds
|
||||||
|
|
||||||
* Fri Oct 18 2019 Stephen Gallagher <sgallagh@redhat.com> - 1.33.0-1
|
* Fri Oct 18 2019 Stephen Gallagher <sgallagh@redhat.com> - 1.33.0-1
|
||||||
- Update to 1.33.0
|
- Update to 1.33.0
|
||||||
- https://github.com/libuv/libuv/blob/v1.33.0/ChangeLog
|
- https://github.com/libuv/libuv/blob/v1.33.0/ChangeLog
|
||||||
|
Loading…
Reference in New Issue
Block a user