summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorOleksandr Kravchuk <open.source@oleksandr-kravchuk.com>2019-09-25 23:19:55 +0200
committerKhem Raj <raj.khem@gmail.com>2019-09-25 17:58:46 -0700
commitffe65616eccbc73699d0e5b17e09897adeb740ee (patch)
treef5b3c8094ee7eced91118d4722106bf930b092cb /meta-oe
parent13e0f3364e0381f4952e381ca9e4e76e7947463e (diff)
downloadmeta-openembedded-ffe65616eccbc73699d0e5b17e09897adeb740ee.tar.gz
sanlock: update to 3.6.0
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch80
-rw-r--r--meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb (renamed from meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb)6
2 files changed, 2 insertions, 84 deletions
diff --git a/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch b/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch
deleted file mode 100644
index e4bde80a0..000000000
--- a/meta-oe/recipes-extended/sanlock/sanlock/0001-fix-compile-failure-with-libc-musl.patch
+++ /dev/null
@@ -1,80 +0,0 @@
1From c51c2c543f3c78b2a68acc61f786f903f2e0fec8 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sun, 9 Sep 2018 07:28:09 -0400
4Subject: [PATCH] fix compile failure with libc musl
5
6The lack of random_r in musl:
7[snip]
8|main.c:1393:7: warning: implicit declaration of function 'random_r';
9did you mean 'random'? [-Wimplicit-function-declaration]
10| rv = random_r(&rand_data, &val);
11| ^~~~~~~~
12| random
13|main.c:1408:30: error: invalid application of 'sizeof' to incomplete
14type 'struct random_data'
15| memset(&rand_data, 0, sizeof(rand_data));
16[snip]
17
18s/random_r/random/, s/initstate_r/initstate/ and remove `static struct
19random_data rand_data'
20
21Here is the man of `random_r()':
22[snip]
23The random_r() function is like random(3), except that instead of using
24state information maintained in a global variable
25[snip]
26
27So use random without state information is OK.
28
29Upstream-Status: Submitted [sanlock-devel@lists.fedorahosted.org]
30Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
31---
32 src/main.c | 12 ++++--------
33 1 file changed, 4 insertions(+), 8 deletions(-)
34
35diff --git a/src/main.c b/src/main.c
36index f60b4d3..602c400 100644
37--- a/src/main.c
38+++ b/src/main.c
39@@ -84,7 +84,6 @@ static char command[COMMAND_MAX];
40 static int cmd_argc;
41 static char **cmd_argv;
42 static struct thread_pool pool;
43-static struct random_data rand_data;
44 static char rand_state[32];
45 static pthread_mutex_t rand_mutex = PTHREAD_MUTEX_INITIALIZER;
46 static const char *run_dir = NULL;
47@@ -1386,16 +1385,15 @@ int get_rand(int a, int b);
48
49 int get_rand(int a, int b)
50 {
51- int32_t val;
52- int rv;
53+ long int rv;
54
55 pthread_mutex_lock(&rand_mutex);
56- rv = random_r(&rand_data, &val);
57+ rv = random();
58 pthread_mutex_unlock(&rand_mutex);
59 if (rv < 0)
60 return rv;
61
62- return a + (int) (((float)(b - a + 1)) * val / (RAND_MAX+1.0));
63+ return a + (int) (((float)(b - a + 1)) * rv / (RAND_MAX+1.0));
64 }
65
66 static void setup_host_name(void)
67@@ -1405,9 +1403,7 @@ static void setup_host_name(void)
68 uuid_t uu;
69
70 memset(rand_state, 0, sizeof(rand_state));
71- memset(&rand_data, 0, sizeof(rand_data));
72-
73- initstate_r(time(NULL), rand_state, sizeof(rand_state), &rand_data);
74+ initstate(time(NULL), rand_state, sizeof(rand_state));
75
76 /* use host name from command line */
77
78--
792.8.1
80
diff --git a/meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
index c51bccce3..9f7ce9c57 100644
--- a/meta-oe/recipes-extended/sanlock/sanlock_3.6.0.bb
+++ b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
@@ -11,10 +11,8 @@ SECTION = "utils"
11LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" 11LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
12LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" 12LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22"
13 13
14SRC_URI = "git://pagure.io/sanlock.git;protocol=http \ 14SRC_URI = "git://pagure.io/sanlock.git;protocol=http"
15 file://0001-fix-compile-failure-with-libc-musl.patch \ 15SRCREV = "7afe0e66f5c7f24894896fad20ffa6f39733d80f"
16 "
17SRCREV = "90b2ffa77edd46bea007b7bb39bfd4d2db2ff7af"
18S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
19 17
20DEPENDS = "libaio util-linux" 18DEPENDS = "libaio util-linux"