• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
 
1
Do not call posix_fallocate() on uClibc
2
​
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.
7
​
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(+)
13
​
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 @@
27
        }
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:
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.