From patchwork Wed Jan 14 12:21:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Merlijn Wajer X-Patchwork-Id: 5630811 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 23678C058D for ; Wed, 14 Jan 2015 12:23:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3401B2038D for ; Wed, 14 Jan 2015 12:23:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18D5C20384 for ; Wed, 14 Jan 2015 12:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752929AbbANMW4 (ORCPT ); Wed, 14 Jan 2015 07:22:56 -0500 Received: from nala.villavu.com ([188.165.243.101]:51388 "EHLO nala.villavu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752460AbbANMWy (ORCPT ); Wed, 14 Jan 2015 07:22:54 -0500 Received: from a82-161-36-93.adsl.xs4all.nl ([82.161.36.93] helo=[192.168.178.31]) by nala.villavu.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80.1) (envelope-from ) id 1YBMyR-00026i-Af; Wed, 14 Jan 2015 13:22:59 +0100 Message-ID: <54B65F5E.6020103@wizzup.org> Date: Wed, 14 Jan 2015 13:21:50 +0100 From: Merlijn Wajer User-Agent: Mozilla/5.0 (X11; Linux armv7l; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "linux-btrfs@vger.kernel.org" CC: merlijn@wizzup.org, dsterba@suse.cz, Josef Bacik Subject: [PATCH] Restore backtrace functionality on glibc X-Enigmail-Version: 1.6 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi David, Josef, Please find attached a patch that restores backtrace functionality when using glibc. Note that "#include " 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 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 --- 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 #include -#ifndef __glibc__ +#include + +#ifndef __GLIBC__ #define BTRFS_DISABLE_BACKTRACE #define __always_inline __inline __attribute__ ((__always_inline__)) #endif -- 2.0.5