From patchwork Sun Feb 3 15:56:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 2087791 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5E973DF23E for ; Sun, 3 Feb 2013 15:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552Ab3BCP4O (ORCPT ); Sun, 3 Feb 2013 10:56:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8981 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752876Ab3BCP4N (ORCPT ); Sun, 3 Feb 2013 10:56:13 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r13Fu9Zk030916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 3 Feb 2013 10:56:09 -0500 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r13Fu8To012174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Feb 2013 10:56:08 -0500 Message-ID: <510E8898.4050606@redhat.com> Date: Sun, 03 Feb 2013 09:56:08 -0600 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: kreijack@inwind.it CC: Chris Mason , linux-btrfs Subject: Re: [BTRFS-PROGS][PATCH] remove __attribute_const__ from raid6.c References: <510D7356.4030903@inwind.it> In-Reply-To: <510D7356.4030903@inwind.it> X-Enigmail-Version: 1.5 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 2/2/13 2:13 PM, Goffredo Baroncelli wrote: > Hi all, > > I am playing with the new branch raid56-experimental. Unfortunately > I was not able to compile the btrfs-progs tools because my gcc was unable > to find '__attribute_const__': > > [...] > raid6.c:48:1: error: unknown type name ‘__attribute_const__’ > raid6.c:48:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SHLBYTE’ > raid6.c:60:1: error: unknown type name ‘__attribute_const__’ > raid6.c:60:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘MASK’ > [...] Something like this might be more in the spirit of the kernel code copy, and will keep the annotations. (I'm not sure why the kernel does it this way, TBH). From: Eric Sandeen btrfs-progs: define __attribute_const__ in kerncompat.h Without this we can't build userspace. Signed-off-by: Eric Sandeen --- -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kerncompat.h b/kerncompat.h index d60f722..8004f9e 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -126,6 +126,8 @@ static inline int mutex_is_locked(struct mutex *m) #define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) +#define __attribute_const__ __attribute__((const)) + /** * __set_bit - Set a bit in memory * @nr: the bit to set diff --git a/raid6.c b/raid6.c index 3a42bdf..ce0f655 100644 --- a/raid6.c +++ b/raid6.c @@ -19,6 +19,8 @@ */ #include #include +#include "kerncompat.h" + /* * This is the C data type to use */