Mercurial > vanilla
comparison core/lvm2/musl.patch @ 98:11b453a08c70
core/lvm2: initial import, closes #1034
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 09 Mar 2019 10:43:48 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
97:63514fe57d33 | 98:11b453a08c70 |
---|---|
1 --- libdaemon/server/daemon-server.c 2014-11-29 00:07:42.000000000 +0100 | |
2 +++ libdaemon/server/daemon-server.c 2014-12-28 08:22:40.985928408 +0100 | |
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 2016-06-07 08:00:46.557058318 +0200 | |
13 +++ lib/mm/memlock.c 2016-06-07 08:01:25.453505793 +0200 | |
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 | |
53 +++ lib/commands/toolcontext.c | |
54 @@ -1860,7 +1860,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 /* Allocate 2 buffers */ | |
63 @@ -2241,7 +2241,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) && |