aboutsummaryrefslogtreecommitdiffstats
path: root/kerncompat.h
diff options
context:
space:
mode:
authorMerlijn Wajer <merlijn@wizzup.org>2014-12-13 15:08:43 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-18 18:28:34 +0100
commitc2691f807ddd2c6b261c5707f6838a45d9275390 (patch)
treee9f60b256c2f7d0575d649545e36d6ca8c63df0a /kerncompat.h
parentc69854247b64dbb00e823abaf4cefe6aa7be0623 (diff)
downloadbtrfs-progs-c2691f807ddd2c6b261c5707f6838a45d9275390.tar.gz
btrfs-progs-c2691f807ddd2c6b261c5707f6838a45d9275390.tar.xz
btrfs-progs-c2691f807ddd2c6b261c5707f6838a45d9275390.zip
btrfs-progs: disable backtrace and define __always_inline
Disable backtrace and define __always_inline when glibc is not used as libc. This, together with some header changes allows btrfs-progs to compile with musl-libc. Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 5c1cca9..7397274 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -29,6 +29,12 @@
#include <stddef.h>
#include <linux/types.h>
#include <stdint.h>
+
+#ifndef __glibc__
+#define BTRFS_DISABLE_BACKTRACE
+#define __always_inline __inline __attribute__ ((__always_inline__))
+#endif
+
#ifndef BTRFS_DISABLE_BACKTRACE
#include <execinfo.h>
#endif