All of lore.kernel.org
 help / color / mirror / Atom feed
From: Merlijn Wajer <merlijn@wizzup.org>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Cc: merlijn@wizzup.org, dsterba@suse.cz, Josef Bacik <jbacik@fb.com>
Subject: [PATCH] Restore backtrace functionality on glibc
Date: Wed, 14 Jan 2015 13:21:50 +0100	[thread overview]
Message-ID: <54B65F5E.6020103@wizzup.org> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Restore-backtrace-functionality-on-glibc.patch --]
[-- Type: text/x-patch; name="0001-Restore-backtrace-functionality-on-glibc.patch", Size: 981 bytes --]

From 66bec5ce01f650839b3cbd88ac40594daaab0299 Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <merlijn@wizzup.org>
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.

Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 kerncompat.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kerncompat.h b/kerncompat.h
index 7397274..314ea02 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -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
-- 
2.0.5


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

             reply	other threads:[~2015-01-14 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 12:21 Merlijn Wajer [this message]
2015-01-15 12:36 ` [PATCH] Restore backtrace functionality on glibc David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B65F5E.6020103@wizzup.org \
    --to=merlijn@wizzup.org \
    --cc=dsterba@suse.cz \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.