lvm2: Add patch for musl

This commit is contained in:
Dylan Araps 2019-06-23 08:51:58 +03:00
parent 6b12651cbc
commit 6ebf86cde6
3 changed files with 30 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh -e
patch -p1 < portability.patch
./configure \
--prefix=/usr \
--disable-selinux

View File

@ -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 <fcntl.h>
#include <dlfcn.h>
#include <errno.h>
#include <pthread.h>
--- 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;

View File

@ -1 +1,2 @@
https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.2.02.184.tgz
patches/portability.patch