summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
index d2d6d76fd7..c5fac9b040 100644
--- a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
+++ b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
@@ -1,33 +1,33 @@
1From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001 1From 00ba7cdd0608b1507027428f9f87b1cb9747372b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Dengke Du <dengke.du@windriver.com>
3Date: Fri, 8 Jan 2016 07:32:24 +0000 3Date: Thu, 9 Feb 2017 15:54:53 +0800
4Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of 4Subject: [PATCH] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
5 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc 5 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
6 6
7e.g. musl does not implement the _NP mutex types 7e.g. musl does not implement the _NP mutex types
8 8
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Signed-off-by: Dengke Du <dengke.du@windriver.com>
10--- 11---
11 lib/tst_res.c | 5 ++++- 12 lib/tst_res.c | 4 ++++
12 1 file changed, 4 insertions(+), 1 deletion(-) 13 1 file changed, 4 insertions(+)
13 14
14diff --git a/lib/tst_res.c b/lib/tst_res.c 15diff --git a/lib/tst_res.c b/lib/tst_res.c
15index 5c1c58c..3244b5e 100644 16index 61daaeb..435224f 100644
16--- a/lib/tst_res.c 17--- a/lib/tst_res.c
17+++ b/lib/tst_res.c 18+++ b/lib/tst_res.c
18@@ -104,8 +104,11 @@ int TEST_ERRNO; 19@@ -79,7 +79,11 @@ int TEST_ERRNO;
19 assert(strlen(buf) > 0); \ 20 assert(strlen(buf) > 0); \
20 } while (0) 21 } while (0)
21 22
22+#ifdef __GLIBC__ 23+#ifdef __GLIBC__
23 static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; 24 static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
24-
25+#else 25+#else
26+static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE }; 26+static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE };
27+#endif 27+#endif
28 /* 28
29 * Define local function prototypes. 29 static void check_env(void);
30 */ 30 static void tst_condense(int tnum, int ttype, const char *tmesg);
31-- 31--
322.7.0 322.7.4
33 33