diff options
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/gnutls/gnutls/check_SYS_getrandom.patch | 35 | ||||
-rw-r--r-- | meta/recipes-support/gnutls/gnutls_3.5.3.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/check_SYS_getrandom.patch b/meta/recipes-support/gnutls/gnutls/check_SYS_getrandom.patch new file mode 100644 index 0000000000..535c22af14 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/check_SYS_getrandom.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From f26c3979ab0325edb2e410d287bc501cf00e0ac0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nikos Mavrogiannopoulos <nmav@redhat.com> | ||
3 | Date: Mon, 22 Aug 2016 16:32:34 +0200 | ||
4 | Subject: [PATCH] rnd-linux: added check for SYS_getrandom being defined | ||
5 | |||
6 | This allows to compile the getrandom() code in old Linux systems | ||
7 | which do not have the system call defined. | ||
8 | --- | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | lib/nettle/rnd-linux.c | 6 +++++- | ||
14 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/lib/nettle/rnd-linux.c b/lib/nettle/rnd-linux.c | ||
17 | index d7f07a6..7a24d05 100644 | ||
18 | --- a/lib/nettle/rnd-linux.c | ||
19 | +++ b/lib/nettle/rnd-linux.c | ||
20 | @@ -56,7 +56,11 @@ static dev_t _gnutls_urandom_fd_rdev = 0; | ||
21 | # else | ||
22 | # include <sys/syscall.h> | ||
23 | # undef getrandom | ||
24 | -# define getrandom(dst,s,flags) syscall(SYS_getrandom, (void*)dst, (size_t)s, (unsigned int)flags) | ||
25 | +# if defined(SYS_getrandom) | ||
26 | +# define getrandom(dst,s,flags) syscall(SYS_getrandom, (void*)dst, (size_t)s, (unsigned int)flags) | ||
27 | +# else | ||
28 | +# define getrandom(dst,s,flags) -1 | ||
29 | +# endif | ||
30 | # endif | ||
31 | |||
32 | static unsigned have_getrandom(void) | ||
33 | -- | ||
34 | libgit2 0.24.0 | ||
35 | |||
diff --git a/meta/recipes-support/gnutls/gnutls_3.5.3.bb b/meta/recipes-support/gnutls/gnutls_3.5.3.bb index b2dbb07124..04005883a9 100644 --- a/meta/recipes-support/gnutls/gnutls_3.5.3.bb +++ b/meta/recipes-support/gnutls/gnutls_3.5.3.bb | |||
@@ -4,6 +4,7 @@ SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \ | |||
4 | file://0001-configure.ac-fix-sed-command.patch \ | 4 | file://0001-configure.ac-fix-sed-command.patch \ |
5 | file://use-pkg-config-to-locate-zlib.patch \ | 5 | file://use-pkg-config-to-locate-zlib.patch \ |
6 | file://0001-Use-correct-include-dir-with-minitasn.patch \ | 6 | file://0001-Use-correct-include-dir-with-minitasn.patch \ |
7 | file://check_SYS_getrandom.patch \ | ||
7 | file://CVE-2016-7444.patch \ | 8 | file://CVE-2016-7444.patch \ |
8 | " | 9 | " |
9 | SRC_URI[md5sum] = "6c2c7f40ddf52933ee3ca474cb8cb63c" | 10 | SRC_URI[md5sum] = "6c2c7f40ddf52933ee3ca474cb8cb63c" |