Skip to contentSkip to conversation

ebizzy: guard mallocopt() with __GLIBC__

PATCH New Petr Vorel 1 participant 1 message May 18, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 ebizzy: guard mallocopt() with __GLIBC__

From: Khem Raj <[email protected]>

mallocopt is not available on non glibc implementations

---
 utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
utils/benchmark/ebizzy-0.3/ebizzy.c +2 -2
index 5bb8eff56..934d951f3 100644
@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[])
 			"\"never mmap\" option specified\n");
 		usage();
 	}
-
+#ifdef __GLIBC__
 	if (never_mmap)
 		mallopt(M_MMAP_MAX, 0);
-
+#endif
 	if (chunk_size < record_size) {
 		fprintf(stderr, "Chunk size %u smaller than record size %u\n",
 			chunk_size, record_size);
Signature · 1 line
2.26.2