From ac8252cb32d1293c19963dbcf5d1902f807e78bd Mon Sep 17 00:00:00 2001 From: Mikko Gronoff Date: Mon, 27 Feb 2017 18:02:33 +0200 Subject: gnutls: add patch to fix build break with older kernels (< 3.4.17) Add patch missing from poky morty branch to fix gnutls 3.5.3 build break with jetson-tx1 image build. Change-Id: I2c41989aef485ea9ca0b7927285c6558c2491c32 Reviewed-by: Samuli Piippo --- recipes/gnutls/files/check_SYS_getrandom.patch | 36 ++++++++++++++++++++++++++ recipes/gnutls/gnutls_3.%.bbappend | 32 +++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 recipes/gnutls/files/check_SYS_getrandom.patch create mode 100644 recipes/gnutls/gnutls_3.%.bbappend (limited to 'recipes') diff --git a/recipes/gnutls/files/check_SYS_getrandom.patch b/recipes/gnutls/files/check_SYS_getrandom.patch new file mode 100644 index 0000000..50693bf --- /dev/null +++ b/recipes/gnutls/files/check_SYS_getrandom.patch @@ -0,0 +1,36 @@ +From f26c3979ab0325edb2e410d287bc501cf00e0ac0 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Mon, 22 Aug 2016 16:32:34 +0200 +Subject: [PATCH] rnd-linux: added check for SYS_getrandom being defined + +This allows to compile the getrandom() code in old Linux systems +which do not have the system call defined. +--- + +Upstream-Status: Backport +Signed-off-by: Khem Raj + + lib/nettle/rnd-linux.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/nettle/rnd-linux.c b/lib/nettle/rnd-linux.c +index d7f07a6..7a24d05 100644 +--- a/lib/nettle/rnd-linux.c ++++ b/lib/nettle/rnd-linux.c +@@ -56,7 +56,11 @@ static dev_t _gnutls_urandom_fd_rdev = 0; + # else + # include + # undef getrandom +-# define getrandom(dst,s,flags) syscall(SYS_getrandom, (void*)dst, (size_t)s, (unsigned int)flags) ++# if defined(SYS_getrandom) ++# define getrandom(dst,s,flags) syscall(SYS_getrandom, (void*)dst, (size_t)s, (unsigned int)flags) ++# else ++# define getrandom(dst,s,flags) -1 ++# endif + # endif + + static unsigned have_getrandom(void) +-- +libgit2 0.24.0 + + diff --git a/recipes/gnutls/gnutls_3.%.bbappend b/recipes/gnutls/gnutls_3.%.bbappend new file mode 100644 index 0000000..8d91bb0 --- /dev/null +++ b/recipes/gnutls/gnutls_3.%.bbappend @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://check_SYS_getrandom.patch" -- cgit v1.2.3-54-g00ecf