[PATCH 54/73] btrfs-tools: Disable backtrace on musl

Khem Raj
2016-01-17T11:37:47Z

musl does not support backtrace APIs
include limit.h for PATH_MAX definition

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...001-btrfs-corrupt-blocks-Include-limits.h.patch | 34 ++++++++++++++++++++++
.../btrfs-tools/btrfs-tools_4.3.1.bb | 3 ++
2 files changed, 37 insertions(+)
create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch

diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch
new file mode 100644
index 0000000..35bd021
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-corrupt-blocks-Include-limits.h.patch
@@ -0,0 +1,34 @@
+From 57f55247af39173d10c6332bd147a5169c478628 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jan 2016 18:58:27 -0800
+Subject: [PATCH] btrfs-corrupt-blocks: Include limits.h
+
+limits.h is needed for PATH_MAX definition
+
+Fixes
+| btrfs-corrupt-block.c: In function 'corrupt_dir_item':
+| btrfs-corrupt-block.c:478:12: error: 'PATH_MAX' undeclared (first use in this function)
+| char name[PATH_MAX];
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ btrfs-corrupt-block.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
+index 0b26903..c908b7e 100644
+--- a/btrfs-corrupt-block.c
++++ b/btrfs-corrupt-block.c
+@@ -21,6 +21,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <getopt.h>
++#include <limits.h>
+
+ #include "kerncompat.h"
+ #include "ctree.h"
+--
+2.7.0
+
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.3.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.3.1.bb
index e6b0132..339668c 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.3.1.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.3.1.bb
@@ -15,11 +15,14 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl"
SRCREV = "7c3394ed9ef2063a7256d4bc078a485b6f826bc5"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
file://fix-parallel.patch \
+ file://0001-btrfs-corrupt-blocks-Include-limits.h.patch \
"

inherit autotools-brokensep pkgconfig

EXTRA_OECONF += "--disable-documentation"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+

do_configure_prepend() {
sh autogen.sh
--
2.7.0