diff options
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch new file mode 100644 index 0000000000..5622a64d43 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 8 Jan 2016 06:51:20 +0000 | ||
4 | Subject: [PATCH] guard mallocopt() with __GLIBC__ | ||
5 | |||
6 | mallocopt is not available on non glibc implementations | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c | ||
16 | index 5bb8eff..934d951 100644 | ||
17 | --- a/utils/benchmark/ebizzy-0.3/ebizzy.c | ||
18 | +++ b/utils/benchmark/ebizzy-0.3/ebizzy.c | ||
19 | @@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[]) | ||
20 | "\"never mmap\" option specified\n"); | ||
21 | usage(); | ||
22 | } | ||
23 | - | ||
24 | +#ifdef __GLIBC__ | ||
25 | if (never_mmap) | ||
26 | mallopt(M_MMAP_MAX, 0); | ||
27 | - | ||
28 | +#endif | ||
29 | if (chunk_size < record_size) { | ||
30 | fprintf(stderr, "Chunk size %u smaller than record size %u\n", | ||
31 | chunk_size, record_size); | ||
32 | -- | ||
33 | 2.7.4 | ||
34 | |||