diff --git a/core/lvm2/build b/core/lvm2/build index 81254f55..7959a692 100755 --- a/core/lvm2/build +++ b/core/lvm2/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < portability.patch + ./configure \ --prefix=/usr \ --disable-selinux diff --git a/core/lvm2/patches/portability.patch b/core/lvm2/patches/portability.patch new file mode 100644 index 00000000..37b36fe2 --- /dev/null +++ b/core/lvm2/patches/portability.patch @@ -0,0 +1,27 @@ +Portability fixes: + +- Use fcntl.h for O_RDONLY and friends. +- Only use mallinfo with glibc. + +--- libdaemon/server/daemon-server.c 2014-11-29 00:07:42.000000000 +0100 ++++ libdaemon/server/daemon-server.c 2014-12-28 08:22:40.985928408 +0100 +@@ -14,6 +14,7 @@ + #include "daemon-server.h" + #include "daemon-log.h" + ++#include + #include + #include + #include + +--- lib/mm/memlock.c.orig 2016-06-07 08:00:46.557058318 +0200 ++++ lib/mm/memlock.c 2016-06-07 08:01:25.453505793 +0200 +@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz + + static void _allocate_memory(void) + { +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + void *stack_mem; + struct rlimit limit; + int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks; diff --git a/core/lvm2/sources b/core/lvm2/sources index ba155f7e..20485461 100644 --- a/core/lvm2/sources +++ b/core/lvm2/sources @@ -1 +1,2 @@ https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.2.02.184.tgz +patches/portability.patch