diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-12-06 11:30:03 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-12-09 22:07:07 -0800 |
commit | 355375fb592b31dc9e1d36d7a6f80a4481a3cd88 (patch) | |
tree | 0d4232911a4aac0594da00c618a397009fe2076f | |
parent | 15555389b330544444c1e92c29c0333d12fde214 (diff) | |
download | meta-clang-355375fb592b31dc9e1d36d7a6f80a4481a3cd88.tar.gz |
rng-tools: Drop bbappend
The issue with VLAIS has been addressed upstream now see
https://github.com/nhorman/rng-tools/commit/3e40e6362979bdfb25e335cda20ef75f47183711
and OE-Core has moved to 6.6 now which has this fix
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | recipes-support/rng-tools/rng-tools/When-adding-entropy-allocate-the-struct-dynamically.patch | 50 | ||||
-rw-r--r-- | recipes-support/rng-tools/rng-tools_5.bbappend | 3 |
2 files changed, 0 insertions, 53 deletions
diff --git a/recipes-support/rng-tools/rng-tools/When-adding-entropy-allocate-the-struct-dynamically.patch b/recipes-support/rng-tools/rng-tools/When-adding-entropy-allocate-the-struct-dynamically.patch deleted file mode 100644 index 9bed536..0000000 --- a/recipes-support/rng-tools/rng-tools/When-adding-entropy-allocate-the-struct-dynamically.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 27f234a1bb97f7196466a3535a072fda1b66ea1e Mon Sep 17 00:00:00 2001 | ||
2 | From: Christopher Larson <chris_larson@mentor.com> | ||
3 | Date: Mon, 15 Feb 2016 16:46:46 -0700 | ||
4 | Subject: [PATCH] When adding entropy, allocate the struct dynamically | ||
5 | |||
6 | Clang/LLVM does not support struct fields without a constant size. Also, we | ||
7 | can use the existing struct defined by linux/random.h. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
11 | --- | ||
12 | rngd_linux.c | 16 +++++++--------- | ||
13 | 1 file changed, 7 insertions(+), 9 deletions(-) | ||
14 | |||
15 | diff --git a/rngd_linux.c b/rngd_linux.c | ||
16 | index c4f45de..8f6cca7 100644 | ||
17 | --- a/rngd_linux.c | ||
18 | +++ b/rngd_linux.c | ||
19 | @@ -120,21 +120,19 @@ void init_kernel_rng(const char* randomdev) | ||
20 | |||
21 | void random_add_entropy(void *buf, size_t size) | ||
22 | { | ||
23 | - struct { | ||
24 | - int ent_count; | ||
25 | - int size; | ||
26 | - unsigned char data[size]; | ||
27 | - } entropy; | ||
28 | + struct rand_pool_info *entropy = malloc(sizeof(struct rand_pool_info) + size); | ||
29 | |||
30 | - entropy.ent_count = size * 8; | ||
31 | - entropy.size = size; | ||
32 | - memcpy(entropy.data, buf, size); | ||
33 | + entropy->entropy_count = size * 8; | ||
34 | + entropy->buf_size = size; | ||
35 | + memcpy(entropy->buf, buf, size); | ||
36 | |||
37 | - if (ioctl(random_fd, RNDADDENTROPY, &entropy) != 0) { | ||
38 | + if (ioctl(random_fd, RNDADDENTROPY, entropy) != 0) { | ||
39 | message(LOG_DAEMON|LOG_ERR, "RNDADDENTROPY failed: %s\n", | ||
40 | strerror(errno)); | ||
41 | + free(entropy); | ||
42 | exit(1); | ||
43 | } | ||
44 | + free(entropy); | ||
45 | } | ||
46 | |||
47 | void random_sleep(void) | ||
48 | -- | ||
49 | 2.2.1 | ||
50 | |||
diff --git a/recipes-support/rng-tools/rng-tools_5.bbappend b/recipes-support/rng-tools/rng-tools_5.bbappend deleted file mode 100644 index 6d5aec4..0000000 --- a/recipes-support/rng-tools/rng-tools_5.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI += "file://When-adding-entropy-allocate-the-struct-dynamically.patch" | ||