blob: 5622a64d43cea40f651e55cbb66605057b15303f [file] [log] [blame]
Brad Bishop96ff1982019-08-19 13:50:42 -04001From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 8 Jan 2016 06:51:20 +0000
Brad Bishop96ff1982019-08-19 13:50:42 -04004Subject: [PATCH] guard mallocopt() with __GLIBC__
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005
6mallocopt is not available on non glibc implementations
7
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008Upstream-Status: Pending
Brad Bishop96ff1982019-08-19 13:50:42 -04009
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011---
12 utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
16index 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--
Brad Bishop96ff1982019-08-19 13:50:42 -0400332.7.4
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034