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>
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
22 +#include <features.h>
28 pos->content_size = -1U; /* Unknown at this point */
29 pos->packet_size = WRITE_PACKET_LEN;
31 off = posix_fallocate(pos->fd, pos->mmap_offset,
32 pos->packet_size / CHAR_BIT);