lvm2: fix build with musl

stdin, stderr and stdout are constants on musl and it doesn't provide
mallinfo.
Both, overwriting std* were used to catch and work around various
misbehaviours of glibc, so it's hopefully save to just skip them when
building against other libc implementations.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2015-04-25 23:34:05 +02:00
parent aa1a005c5c
commit f5cc8c27d7
2 changed files with 71 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
Index: LVM2.2.02.118/lib/mm/memlock.c
===================================================================
--- LVM2.2.02.118.orig/lib/mm/memlock.c
+++ LVM2.2.02.118/lib/mm/memlock.c
@@ -137,7 +137,7 @@ static void _touch_memory(void *mem, siz
static void _allocate_memory(void)
{
-#ifndef VALGRIND_POOL
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
void *stack_mem;
struct rlimit limit;
int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;