Mercurial > vanilla
comparison core/lvm2/patch-musl.patch @ 667:1e35a4ddd0f4
core/lvm2: fix build with busybox patch
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 31 Jul 2019 20:00:00 +0200 |
parents | core/lvm2/musl.patch@11b453a08c70 |
children |
comparison
equal
deleted
inserted
replaced
666:e18142de802d | 667:1e35a4ddd0f4 |
---|---|
1 --- libdaemon/server/daemon-server.c.orig | |
2 +++ libdaemon/server/daemon-server.c | |
3 @@ -14,6 +14,7 @@ | |
4 #include "daemon-server.h" | |
5 #include "daemon-log.h" | |
6 | |
7 +#include <fcntl.h> | |
8 #include <dlfcn.h> | |
9 #include <errno.h> | |
10 #include <pthread.h> | |
11 | |
12 --- lib/mm/memlock.c.orig | |
13 +++ lib/mm/memlock.c | |
14 @@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz | |
15 | |
16 static void _allocate_memory(void) | |
17 { | |
18 -#ifndef VALGRIND_POOL | |
19 +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) | |
20 void *stack_mem; | |
21 struct rlimit limit; | |
22 int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks; | |
23 --- tools/lvmcmdline.c | |
24 +++ tools/lvmcmdline.c | |
25 @@ -1252,7 +1252,7 @@ | |
26 int err = is_valid_fd(STDERR_FILENO); | |
27 | |
28 if (!is_valid_fd(STDIN_FILENO) && | |
29 - !(stdin = fopen(_PATH_DEVNULL, "r"))) { | |
30 + !freopen(_PATH_DEVNULL, "r", stdin)) { | |
31 if (err) | |
32 perror("stdin stream open"); | |
33 else | |
34 @@ -1262,7 +1262,7 @@ | |
35 } | |
36 | |
37 if (!is_valid_fd(STDOUT_FILENO) && | |
38 - !(stdout = fopen(_PATH_DEVNULL, "w"))) { | |
39 + !freopen(_PATH_DEVNULL, "w", stdout)) { | |
40 if (err) | |
41 perror("stdout stream open"); | |
42 /* else no stdout */ | |
43 @@ -1270,7 +1270,7 @@ | |
44 } | |
45 | |
46 if (!is_valid_fd(STDERR_FILENO) && | |
47 - !(stderr = fopen(_PATH_DEVNULL, "w"))) { | |
48 + !freopen(_PATH_DEVNULL, "w", stderr)) { | |
49 printf("stderr stream open: %s\n", | |
50 strerror(errno)); | |
51 return 0; | |
52 --- lib/commands/toolcontext.c.orig 2019-07-31 05:55:55.308887587 +0000 | |
53 +++ lib/commands/toolcontext.c 2019-07-31 05:56:42.860889048 +0000 | |
54 @@ -1862,7 +1862,7 @@ | |
55 /* FIXME Make this configurable? */ | |
56 reset_lvm_errno(1); | |
57 | |
58 -#ifndef VALGRIND_POOL | |
59 +#if defined(VALGRIND_POOL) && defined(__GLIBC__) | |
60 /* Set in/out stream buffering before glibc */ | |
61 if (set_buffering | |
62 #ifdef SYS_gettid | |
63 @@ -2256,7 +2256,7 @@ | |
64 if (cmd->libmem) | |
65 dm_pool_destroy(cmd->libmem); | |
66 | |
67 -#ifndef VALGRIND_POOL | |
68 +#if defined(VALGRIND_POOL) && defined(__GLIBC__) | |
69 if (cmd->linebuffer) { | |
70 /* Reset stream buffering to defaults */ | |
71 if (is_valid_fd(STDIN_FILENO) && |