Restore backtrace functionality on glibc
PATCH 1/1 Restore backtrace functionality on glibc
Hi David, Josef,
Please find attached a patch that restores backtrace functionality when using glibc. Note that "#include <features.h>" is included in this patch, but this is not necessary. That is, on glibc systems, stdlib.h and other headers also include this header (And only on glibc systems we care about __GLIBC__ being defined). Nevertheless, I decided to include the include directive as well, for completeness sake.
Josef, can you verify that this patch restores the backtrace functionality?
I'm sorry that my previous patch broke the backtrace functionality -- I guess that sometimes trivial patches can still be wrong. :-)
Regards,
Merlijn
From 66bec5ce01f650839b3cbd88ac40594daaab0299 Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <[email protected]>
Date: Wed, 14 Jan 2015 13:13:15 +0100
Subject: [PATCH] Restore backtrace functionality on glibc.
Originally broke in commit c2691f807ddd2c6b261c5707f6838a45d9275390
__glibc__ should have been __GLIBC__
We also include features.h ; although most includes (at least stdlib.h) typically already include it -- at least on glibc, where it matters.
--- kerncompat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kerncompat.h +3 -1
@@ -30,7 +30,9 @@#include <linux/types.h> #include <stdint.h> -#ifndef __glibc__ +#include <features.h> + +#ifndef __GLIBC__#define BTRFS_DISABLE_BACKTRACE #define __always_inline __inline __attribute__ ((__always_inline__))#endif
Signature · 1 line
2.0.5
Quoted 1 line · Merlijn Wajer
Josef, can you verify that this patch restores the backtrace functionality?
Worked for me, patch applied.
Quoted 2 lines
I'm sorry that my previous patch broke the backtrace functionality -- I guess that sometimes trivial patches can still be wrong. :-)
Yeah :)