python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / btrfs-progs / 0002-kerncompat.h-define-BTRFS_DISABLE_BACKTRACE-when-bui.patch
blob9c1173b3fe1738da183db0e4194a5a468b289e41
1 From 1fc5444f5620670bb9d293be4f92df59661e1810 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Mon, 20 Feb 2017 23:31:24 +0100
4 Subject: [PATCH] kerncompat.h: define BTRFS_DISABLE_BACKTRACE when building
5 with uClibc
7 uClibc does not provide backtrace() nor <execinfo.h>. When building
8 btrfs-progs, passing --disable-backtrace is enough to make it build with
9 uClibc. But once btrfs-progs is installed and another program/library
10 includes kerncompat.h, it fails to build with uClibc, because
11 BTRFS_DISABLE_BACKTRACE is not defined.
13 The most correct fix for this would be to have kerncompat.h generated
14 from kerncompat.h.in during the btrfs-progs build process, and tuned
15 depending on autoconf/automake variables. But as a quick fix that
16 follows the current strategy, we simply tweak the existing __GLIBC__
17 conditional. Indeed, uClibc pretends to be glibc and defines __GLIBC__,
18 but it does not replace it completely, hence the need to define
19 BTRFS_DISABLE_BACKTRACE when __GLIBC__ is not defined *or* when
20 __UCLIBC__ is defined.
22 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
23 ---
24 kerncompat.h | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
27 diff --git a/kerncompat.h b/kerncompat.h
28 index 0f207b7..e47d164 100644
29 --- a/kerncompat.h
30 +++ b/kerncompat.h
31 @@ -32,7 +32,7 @@
33 #include <features.h>
35 -#ifndef __GLIBC__
36 +#if !defined(__GLIBC__) || defined(__UCLIBC__)
37 #ifndef BTRFS_DISABLE_BACKTRACE
38 #define BTRFS_DISABLE_BACKTRACE
39 #endif
40 --
41 2.7.4