diff options
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_.patch | 33 |
1 files changed, 33 insertions, 0 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 new file mode 100644 index 0000000000..d2d6d76fd7 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 8 Jan 2016 07:32:24 +0000 | ||
4 | Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of | ||
5 | PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc | ||
6 | |||
7 | e.g. musl does not implement the _NP mutex types | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | lib/tst_res.c | 5 ++++- | ||
12 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/lib/tst_res.c b/lib/tst_res.c | ||
15 | index 5c1c58c..3244b5e 100644 | ||
16 | --- a/lib/tst_res.c | ||
17 | +++ b/lib/tst_res.c | ||
18 | @@ -104,8 +104,11 @@ int TEST_ERRNO; | ||
19 | assert(strlen(buf) > 0); \ | ||
20 | } while (0) | ||
21 | |||
22 | +#ifdef __GLIBC__ | ||
23 | static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; | ||
24 | - | ||
25 | +#else | ||
26 | +static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE }; | ||
27 | +#endif | ||
28 | /* | ||
29 | * Define local function prototypes. | ||
30 | */ | ||
31 | -- | ||
32 | 2.7.0 | ||
33 | |||