From d8bf70e01e8c2712ce4be8069d90025231a7ac49 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 4 Feb 2012 15:48:48 +0100 Subject: [PATCH] lttng-babeltrace: fix build on uClibc due to missing posix_fallocate() [Peter: add explicit #include Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- ...ace-0.8-no-posix-fallocate-in-uclibc.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch diff --git a/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch new file mode 100644 index 0000000000..d77825fab6 --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace-0.8-no-posix-fallocate-in-uclibc.patch @@ -0,0 +1,37 @@ +Do not call posix_fallocate() on uClibc + +uClibc does not implement posix_fallocate(), and posix_fallocate() is +mostly only an hint to the kernel that we will need such or such +amount of space inside a file. So we just don't call posix_fallocate() +when building against uClibc. + +Signed-off-by: Thomas Petazzoni +[Peter: add #include +--- + formats/ctf/ctf.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: lttng-babeltrace-0.8/formats/ctf/ctf.c +=================================================================== +--- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c ++++ lttng-babeltrace-0.8/formats/ctf/ctf.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -384,9 +385,11 @@ + } + pos->content_size = -1U; /* Unknown at this point */ + pos->packet_size = WRITE_PACKET_LEN; ++#ifndef __UCLIBC__ + off = posix_fallocate(pos->fd, pos->mmap_offset, + pos->packet_size / CHAR_BIT); + assert(off >= 0); ++#endif + pos->offset = 0; + } else { + read_next_packet: -- 2.30.2