glibc: install libmvec.so when available
[buildroot-gz.git] / package / lttng-babeltrace / 0001-no-posix-fallocate-in-uclibc.patch
blobd77825fab65408ffa805a13c3eba670b0f102040
1 Do not call posix_fallocate() on uClibc
3 uClibc does not implement posix_fallocate(), and posix_fallocate() is
4 mostly only an hint to the kernel that we will need such or such
5 amount of space inside a file. So we just don't call posix_fallocate()
6 when building against uClibc.
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 [Peter: add #include <features.h>
10 ---
11 formats/ctf/ctf.c | 3 +++
12 1 file changed, 3 insertions(+)
14 Index: lttng-babeltrace-0.8/formats/ctf/ctf.c
15 ===================================================================
16 --- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c
17 +++ lttng-babeltrace-0.8/formats/ctf/ctf.c
18 @@ -32,6 +32,7 @@
19 #include <sys/stat.h>
20 #include <fcntl.h>
21 #include <dirent.h>
22 +#include <features.h>
23 #include <glib.h>
24 #include <unistd.h>
25 #include <stdlib.h>
26 @@ -384,9 +385,11 @@
28 pos->content_size = -1U; /* Unknown at this point */
29 pos->packet_size = WRITE_PACKET_LEN;
30 +#ifndef __UCLIBC__
31 off = posix_fallocate(pos->fd, pos->mmap_offset,
32 pos->packet_size / CHAR_BIT);
33 assert(off >= 0);
34 +#endif
35 pos->offset = 0;
36 } else {
37 read_next_packet: