From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1JKb2a-0004GL-Hx for user-mode-linux-devel@lists.sourceforge.net; Thu, 31 Jan 2008 07:09:24 -0800 Received: from qb-out-0506.google.com ([72.14.204.227]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1JKb2a-0006NG-5h for user-mode-linux-devel@lists.sourceforge.net; Thu, 31 Jan 2008 07:09:24 -0800 Received: by qb-out-0506.google.com with SMTP id c8so732801qbc.4 for ; Thu, 31 Jan 2008 07:09:23 -0800 (PST) Date: Thu, 31 Jan 2008 23:06:34 +0800 From: WANG Cong Message-ID: <20080131150634.GC2471@hacking> MIME-Version: 1.0 Content-Disposition: inline Subject: [uml-devel] [Patch] arch/um/include/init.h: Fix missing macro definitions Reply-To: WANG Cong List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: LKML Cc: Jeff Dike , user-mode-linux-devel@lists.sourceforge.net This patch fixed the following build error in current -git tree. arch/um/kernel/config.c:10: error: expected declaration specifiers or '...' before '.' token ... Cc: Jeff Dike Signed-off-by: WANG Cong --- diff --git a/arch/um/include/init.h b/arch/um/include/init.h index cebc6ca..70982e1 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h @@ -40,6 +40,18 @@ typedef int (*initcall_t)(void); typedef void (*exitcall_t)(void); +#ifndef __section +# define __section(S) __attribute__ ((__section__(#S))) +#endif + +#ifndef __used +#if __GNUC__ == 3 && __GNUC_MINOR__ == 2 +# define __used __attribute__((__unused__)) +#else +# define __used __attribute__((__used__)) +#endif +#endif + /* These are for everybody (although not all archs will actually discard it in modules) */ #define __init __section(.init.text) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764943AbYAaPJe (ORCPT ); Thu, 31 Jan 2008 10:09:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754061AbYAaPJ1 (ORCPT ); Thu, 31 Jan 2008 10:09:27 -0500 Received: from qb-out-0506.google.com ([72.14.204.227]:18868 "EHLO qb-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756481AbYAaPJ0 (ORCPT ); Thu, 31 Jan 2008 10:09:26 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:mime-version:content-type:content-disposition:user-agent; b=fuieC+rXVwQicfZS5Sb1RbbUjj+VoDzVgQpFyrxgT5/+rGplE/O/W6MuETeYEIqnHVrcVoe58lG/rXooZtEZ4T7Cw5INEqkqnAV5uj60oc3baLkC8Rp+wB5F1u7YIWfAsCSgWzjpeX3PQB7tvJI9fuTC/VGkIwT21SY86utiGt8= Date: Thu, 31 Jan 2008 23:06:34 +0800 From: WANG Cong To: LKML Cc: Jeff Dike , user-mode-linux-devel@lists.sourceforge.net Subject: [Patch] arch/um/include/init.h: Fix missing macro definitions Message-ID: <20080131150634.GC2471@hacking> Reply-To: WANG Cong MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixed the following build error in current -git tree. arch/um/kernel/config.c:10: error: expected declaration specifiers or '...' before '.' token ... Cc: Jeff Dike Signed-off-by: WANG Cong --- diff --git a/arch/um/include/init.h b/arch/um/include/init.h index cebc6ca..70982e1 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h @@ -40,6 +40,18 @@ typedef int (*initcall_t)(void); typedef void (*exitcall_t)(void); +#ifndef __section +# define __section(S) __attribute__ ((__section__(#S))) +#endif + +#ifndef __used +#if __GNUC__ == 3 && __GNUC_MINOR__ == 2 +# define __used __attribute__((__unused__)) +#else +# define __used __attribute__((__used__)) +#endif +#endif + /* These are for everybody (although not all archs will actually discard it in modules) */ #define __init __section(.init.text)